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

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

 



On Wed, 7 Jun 2006 11:03:34 +0200, Ulrich Eckhardt <eckhardt@xxxxxxxxxxxxxx> wrote:
> 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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux