aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-02-03 10:49:17 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-18 19:09:56 +0800
commit3dc8f1e3a8f2cd8481578689f49c586184f25eed (patch)
tree5238d9e3432db8c329572abba6ab7ba3b39e566d /net
parentd2a8d746ae9530aeea0a3b4b129c970ffc90d926 (diff)
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 'net')
0 files changed, 0 insertions, 0 deletions