aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/printf.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-08-14 05:09:31 -0400
committerIngo Molnar <mingo@kernel.org>2013-08-14 05:48:41 -0400
commit5b8fafcac6242bf914334d3ae9dbe921ad8d4634 (patch)
tree50015df4bcd2e0a0e3ef321fe61bbc9663580326 /arch/x86/boot/printf.c
parent28fbc8b6a29c849a3f03a6b05010d4b584055665 (diff)
x86/boot: Fix a sanity check in printf.c
Prior to 9b706aee7d ("x86: trivial printk optimizations") this was 36 because it had 26 characters and 10 digits but now it's just 16 hex digits so the sanity check needs updated. This function is always called with a valid "base" so it doesn't make a difference to how the kernel works, it's just a cleanup. Reported-by: Alexey Petrenko <alexey.petrenko@oracle.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/boot/printf.c')
-rw-r--r--arch/x86/boot/printf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/boot/printf.c b/arch/x86/boot/printf.c
index cdac91ca55d3..565083c16e5c 100644
--- a/arch/x86/boot/printf.c
+++ b/arch/x86/boot/printf.c
@@ -55,7 +55,7 @@ static char *number(char *str, long num, int base, int size, int precision,
55 locase = (type & SMALL); 55 locase = (type & SMALL);
56 if (type & LEFT) 56 if (type & LEFT)
57 type &= ~ZEROPAD; 57 type &= ~ZEROPAD;
58 if (base < 2 || base > 36) 58 if (base < 2 || base > 16)
59 return NULL; 59 return NULL;
60 c = (type & ZEROPAD) ? '0' : ' '; 60 c = (type & ZEROPAD) ? '0' : ' ';
61 sign = 0; 61 sign = 0;