Re: [PATCH] mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy

2017-02-08 Thread Brian Norris
On Sat, Feb 04, 2017 at 10:12:35PM +0100, Marek Vasut wrote: > On 02/03/2017 10:49 AM, Arnd Bergmann wrote: > > 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 argum

Re: [PATCH] mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy

2017-02-04 Thread Marek Vasut
On 02/03/2017 10:49 AM, Arnd Bergmann wrote: > 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 ty

[PATCH] mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy

2017-02-03 Thread Arnd Bergmann
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() simplifi

[PATCH] mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy

2016-09-10 Thread Arnd Bergmann
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() simplifi