diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2017-02-03 10:49:17 +0100 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-07-04 11:51:40 +0200 |
| commit | 6a5108e0b21590c96f13d9b9067922c044ea4bd1 (patch) | |
| tree | ed388cc614ecfa5f6345c580aba2ba88e1e425ab /include/uapi/linux | |
| parent | 75cba2014501fdedf22847abc1a593645c09d177 (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: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions
