Arnd Bergmann 906b268477 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>
2017-02-08 13:15:49 -08:00
..
2016-04-26 00:18:29 -06:00
2016-04-26 00:18:29 -06:00
2016-04-26 00:18:29 -06:00
2017-02-08 12:49:27 -08:00
2008-06-04 17:50:17 +01:00
2012-11-22 12:07:03 +02:00