Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Jean Delvare and committed by
Linus Torvalds
3a126f85 f2e98aa8

+3 -3
+3 -3
kernel/params.c
··· 254 254 255 255 256 256 STANDARD_PARAM_DEF(byte, unsigned char, "%hhu", unsigned long, kstrtoul); 257 - STANDARD_PARAM_DEF(short, short, "%hi", long, kstrtoul); 257 + STANDARD_PARAM_DEF(short, short, "%hi", long, kstrtol); 258 258 STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", unsigned long, kstrtoul); 259 - STANDARD_PARAM_DEF(int, int, "%i", long, kstrtoul); 259 + STANDARD_PARAM_DEF(int, int, "%i", long, kstrtol); 260 260 STANDARD_PARAM_DEF(uint, unsigned int, "%u", unsigned long, kstrtoul); 261 - STANDARD_PARAM_DEF(long, long, "%li", long, kstrtoul); 261 + STANDARD_PARAM_DEF(long, long, "%li", long, kstrtol); 262 262 STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", unsigned long, kstrtoul); 263 263 264 264 int param_set_charp(const char *val, const struct kernel_param *kp)