summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Jaeger <christophjaeger@linux.com>2013-08-20 06:03:18 (GMT)
committerMaciej Wereski <m.wereski@partner.samsung.com>2015-04-03 08:46:52 (GMT)
commit03efaa3c6c6c3f8217c1a15d92d458774d855da7 (patch)
tree4afc13f2936329c17d09838fa8827378850e2e93
parentb8f4e02b063e1ff25fad8c4d7c40e99206862411 (diff)
downloadlinux-3.10-03efaa3c6c6c3f8217c1a15d92d458774d855da7.zip
linux-3.10-03efaa3c6c6c3f8217c1a15d92d458774d855da7.tar.gz
linux-3.10-03efaa3c6c6c3f8217c1a15d92d458774d855da7.tar.bz2
module: fix sprintf format specifier in param_get_byte()
In param_get_byte(), to which the macro STANDARD_PARAM_DEF(byte, ...) expands, "%c" is used to print an unsigned char. So it gets printed as a character what is not intended here. Use "%hhu" instead. [Rusty: note drivers which would be effected: drivers/net/wireless/cw1200/main.c drivers/ntb/ntb_transport.c:68 drivers/scsi/lpfc/lpfc_attr.c drivers/usb/atm/speedtch.c drivers/usb/gadget/g_ffs.c ] Acked-by: Jon Mason <jon.mason@intel.com> (for ntb) Acked-by: Michal Nazarewicz <mina86@mina86.com> (for g_ffs.c) Signed-off-by: Christoph Jaeger <christophjaeger@linux.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r--kernel/params.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/params.c b/kernel/params.c
index 53b958f..b27ba89 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -252,7 +252,7 @@ int parse_args(const char *doing,
EXPORT_SYMBOL(param_ops_##name)
-STANDARD_PARAM_DEF(byte, unsigned char, "%c", unsigned long, strict_strtoul);
+STANDARD_PARAM_DEF(byte, unsigned char, "%hhu", unsigned long, strict_strtoul);
STANDARD_PARAM_DEF(short, short, "%hi", long, strict_strtol);
STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", unsigned long, strict_strtoul);
STANDARD_PARAM_DEF(int, int, "%i", long, strict_strtol);