Commit 5b8fafca authored by Dan Carpenter's avatar Dan Carpenter Committed by Ingo Molnar

x86/boot: Fix a sanity check in printf.c

Prior to 9b706aee ("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: default avatarAlexey Petrenko <alexey.petrenko@oracle.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 28fbc8b6
...@@ -55,7 +55,7 @@ static char *number(char *str, long num, int base, int size, int precision, ...@@ -55,7 +55,7 @@ static char *number(char *str, long num, int base, int size, int precision,
locase = (type & SMALL); locase = (type & SMALL);
if (type & LEFT) if (type & LEFT)
type &= ~ZEROPAD; type &= ~ZEROPAD;
if (base < 2 || base > 36) if (base < 2 || base > 16)
return NULL; return NULL;
c = (type & ZEROPAD) ? '0' : ' '; c = (type & ZEROPAD) ? '0' : ' ';
sign = 0; sign = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment