diff options
| author | Arnd Bergmann <[email protected]> | 2017-02-03 10:49:17 +0100 |
|---|---|---|
| committer | Brian Norris <[email protected]> | 2017-02-08 13:15:49 -0800 |
| commit | 906b268477bc03daaa04f739844c120fe4dbc991 (patch) | |
| tree | 9d16d7f62af080523d29a37c585208735e26dc35 /tools/perf/scripts/python/net_dropmonitor.py | |
| parent | 56ff337ea433731fa5f04cf9901404705bbbb6e0 (diff) | |
mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy
kernelci.org reports a warning for this driver, as it copies a local
variable into a 'const char *' string:
drivers/mtd/maps/pmcmsp-flash.c:149:30: warning: passing argument 1 of 'strncpy' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
Using kstrndup() simplifies the code and avoids the warning.
Signed-off-by: Arnd Bergmann <[email protected]>
Acked-by: Marek Vasut <[email protected]>
Signed-off-by: Brian Norris <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions