Skip to content

Commit

Permalink
kernel/params: fix handling of signed integer types
Browse files Browse the repository at this point in the history
Commit 6072ddc ("kernel: replace strict_strto*() with kstrto*()")
broke the handling of signed integer types, fix it.

Signed-off-by: Jean Delvare <[email protected]>
Reported-by: Christian Kujau <[email protected]>
Tested-by: Christian Kujau <[email protected]>
Cc: Jingoo Han <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Jean Delvare authored and torvalds committed Sep 28, 2013
1 parent f2e98aa commit 3a126f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/params.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,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)
Expand Down

0 comments on commit 3a126f8

Please sign in to comment.