summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2013-09-27 20:17:39 (GMT)
committerMaciej Wereski <m.wereski@partner.samsung.com>2015-04-03 08:46:52 (GMT)
commit78537450a30f413df21da57371ea2db038ace22c (patch)
tree3e204107870bd6985b6149714510554e94cd1737
parentcbc54f06ad40c99aeabe87491290bd7e775970ae (diff)
downloadlinux-3.10-78537450a30f413df21da57371ea2db038ace22c.zip
linux-3.10-78537450a30f413df21da57371ea2db038ace22c.tar.gz
linux-3.10-78537450a30f413df21da57371ea2db038ace22c.tar.bz2
kernel/params: fix handling of signed integer types
Commit 6072ddc8520b ("kernel: replace strict_strto*() with kstrto*()") broke the handling of signed integer types, fix it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Reported-by: Christian Kujau <lists@nerdbynature.de> Tested-by: Christian Kujau <lists@nerdbynature.de> Cc: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--kernel/params.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/params.c b/kernel/params.c
index 4b41da5..27f5b0a 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -253,11 +253,11 @@ int parse_args(const char *doing,
STANDARD_PARAM_DEF(byte, unsigned char, "%hhu", unsigned long, kstrtoul);
-STANDARD_PARAM_DEF(short, short, "%hi", long, kstrtoul);
+STANDARD_PARAM_DEF(short, short, "%hi", long, kstrtol);
STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", unsigned long, kstrtoul);
-STANDARD_PARAM_DEF(int, int, "%i", long, kstrtoul);
+STANDARD_PARAM_DEF(int, int, "%i", long, kstrtol);
STANDARD_PARAM_DEF(uint, unsigned int, "%u", unsigned long, kstrtoul);
-STANDARD_PARAM_DEF(long, long, "%li", long, kstrtoul);
+STANDARD_PARAM_DEF(long, long, "%li", long, kstrtol);
STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", unsigned long, kstrtoul);
int param_set_charp(const char *val, const struct kernel_param *kp)