[Top] [All Lists]

Re: [PATCH] fix some compiler warnings (field width, unused variable)

Subject: Re: [PATCH] fix some compiler warnings (field width, unused variable)
From: Atsushi Nemoto <>
Date: Wed, 07 Jun 2006 23:58:45 +0900 (JST)
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <>
On Wed, 7 Jun 2006 11:03:34 +0200, Ulrich Eckhardt <> 
> I'm not so sure if this is a good idea because some systems have 36
> bit physical addresses while they only have 32 bit void pointers, so
> long long is probably really the better solution.

In general, it would be better to use "long long" for 32bit physical
address.  For this particular code, both values are "unsigned long" so
casting to "void *" for printing should be safe anyway.

> I'm wondering if it would be worth having a special flag in printk
> to indicate a physical address ("%lp" perhaps?) so that you don't
> get the unimportant leading zeroes for the bits 36 to 63 for above
> mentioned platforms.

It might raise some new gcc/sparse warnings about format strings :-)

Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>