diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-02-03 10:49:17 +0100 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2017-02-08 13:15:49 -0800 |
commit | 906b268477bc03daaa04f739844c120fe4dbc991 (patch) | |
tree | 9d16d7f62af080523d29a37c585208735e26dc35 /Documentation/power | |
parent | 56ff337ea433731fa5f04cf9901404705bbbb6e0 (diff) | |
download | linux-906b268477bc03daaa04f739844c120fe4dbc991.tar.gz linux-906b268477bc03daaa04f739844c120fe4dbc991.tar.bz2 linux-906b268477bc03daaa04f739844c120fe4dbc991.zip |
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 <arnd@arndb.de>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'Documentation/power')
0 files changed, 0 insertions, 0 deletions