[PATCH] Fix broken debug output reserve_region_with_split()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Benjamin Herrenschmidt
Date: Monday, October 13, 2008 - 5:53 pm

That debug outpout in kernel/resource.c is busted on 32-bit
machines, fix it with appropriate casts.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

One day Yinghai will figure out that resource_size_t can be 32-bit
and thus as printk arguments must be cast to (unsigned long long)
explicitely when using %llx... hopefully, that day, Ingo will also
catch these before committing them as it's not the first one like
this :-)


 kernel/resource.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- linux-work.orig/kernel/resource.c	2008-10-14 11:48:31.000000000 +1100
+++ linux-work/kernel/resource.c	2008-10-14 11:48:50.000000000 +1100
@@ -550,8 +550,9 @@ static void __init __reserve_region_with
 
 	if (!res) {
 		printk(KERN_DEBUG "    __reserve_region_with_split: (%s) [%llx, %llx], res: (%s) [%llx, %llx]\n",
-			 conflict->name, conflict->start, conflict->end,
-			 name, start, end);
+		       conflict->name, (unsigned long long)conflict->start,
+		       (unsigned long long)conflict->end,
+		       name, (unsigned long long)start, (unsigned long long)end);
 
 		/* failed, split and try again */
 

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Fix broken debug output reserve_region_with_split(), Benjamin Herrenschmidt, (Mon Oct 13, 5:53 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Mon Oct 13, 6:41 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Mon Oct 13, 6:41 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Mon Oct 13, 7:15 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Mon Oct 13, 8:47 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Geert Uytterhoeven, (Thu Oct 16, 1:30 am)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Thu Oct 16, 8:02 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Thu Oct 16, 8:06 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Thu Oct 16, 8:31 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Thu Oct 16, 8:46 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Thu Oct 16, 9:05 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Thu Oct 16, 10:00 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Thu Oct 16, 10:12 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Thu Oct 16, 10:21 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Thu Oct 16, 11:36 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Fri Oct 17, 2:03 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Fri Oct 17, 2:45 pm)
Re: [PATCH] Fix broken debug output reserve_region_with_sp ..., Benjamin Herrenschmidt, (Sun Oct 19, 8:37 pm)