diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-02-03 09:49:17 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-18 11:14:28 (GMT) |
commit | 7b767f6b515d196b832d178035cb865c67937312 (patch) | |
tree | c616d13628c62620ed3729212ffd7fe29b9c2f55 /drivers/mfd/88pm80x.c | |
parent | 976e40d7f6fe15212a0ce6ef0f687130285fecab (diff) | |
download | linux-7b767f6b515d196b832d178035cb865c67937312.tar.xz |
mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy
commit 906b268477bc03daaa04f739844c120fe4dbc991 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mfd/88pm80x.c')
0 files changed, 0 insertions, 0 deletions