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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  5b8fafcac6242bf914334d3ae9dbe921ad8d4634
Gitweb:     http://git.kernel.org/tip/5b8fafcac6242bf914334d3ae9dbe921ad8d4634
Author:     Dan Carpenter <dan.carpenter@xxxxxxxxxx>
AuthorDate: Wed, 14 Aug 2013 12:09:31 +0300
Committer:  Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Wed, 14 Aug 2013 11:48:41 +0200

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@xxxxxxxxxx>
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
 arch/x86/boot/printf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/printf.c b/arch/x86/boot/printf.c
index cdac91c..565083c 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,
 	locase = (type & SMALL);
 	if (type & LEFT)
 		type &= ~ZEROPAD;
-	if (base < 2 || base > 36)
+	if (base < 2 || base > 16)
 		return NULL;
 	c = (type & ZEROPAD) ? '0' : ' ';
 	sign = 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux