[lkml]   [2006]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH] avoid compiler warnings
On Wed, 15 Nov 2006 16:47:59 +0000, Jan Beulich wrote:
> >>Pointers should not be casted to u32 as this results in compiler warnings
> >>on 64-bit platforms.
> >
> >NAK. Use "%p" for formatting pointers. No casts needed.
> Indeed, how did I not see this... While at this, I saw that there were a few
> more instances that needed fixing (they weren't actively generating warnings
> because of the build settings).

Tested on x86-64 and i386, and it did kill the warnings w/o noticeable regressions.

However, for some reason (config settings?) you didn't fix the two cast warnings
in utdebug.c; the appended patch fixes them too.

Signed-off-by: Mikael Pettersson <>

--- linux-2.6.19-rc5/drivers/acpi/utilities/utdebug.c.~1~ 2006-09-20 19:28:46.000000000 +0200
+++ linux-2.6.19-rc5/drivers/acpi/utilities/utdebug.c 2006-11-15 21:22:27.000000000 +0100
@@ -180,8 +180,8 @@ acpi_ut_debug_print(u32 requested_debug_
if (thread_id != acpi_gbl_prev_thread_id) {
if (ACPI_LV_THREADS & acpi_dbg_level) {
- ("\n**** Context Switch from TID %X to TID %X ****\n\n",
- (u32) acpi_gbl_prev_thread_id, (u32) thread_id);
+ ("\n**** Context Switch from TID %p to TID %p ****\n\n",
+ acpi_gbl_prev_thread_id, thread_id);

acpi_gbl_prev_thread_id = thread_id;
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2006-11-16 13:41    [W:0.018 / U:6.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site