From: Bjorn Helgaas Date: Tue, 6 Oct 2009 21:33:29 +0000 (-0600) Subject: vsprintf: fix io/mem resource width X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2840537228fba95e05cab1a6b5719c61982db279;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git vsprintf: fix io/mem resource width The leading "0x" consumes field width, so leave space for it in addition to the 4 or 8 hex digits. This means we'll print "0x0000-0x01df" rather than "0x00-0x1df", for example. Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes --- diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 33bed5e67a21..7830576018c0 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -598,11 +598,11 @@ static char *resource_string(char *buf, char *end, struct resource *res, struct printf_spec spec) { #ifndef IO_RSRC_PRINTK_SIZE -#define IO_RSRC_PRINTK_SIZE 4 +#define IO_RSRC_PRINTK_SIZE 6 #endif #ifndef MEM_RSRC_PRINTK_SIZE -#define MEM_RSRC_PRINTK_SIZE 8 +#define MEM_RSRC_PRINTK_SIZE 10 #endif struct printf_spec num_spec = { .base = 16,