Re: [PATCH v2 03/20] ARM: LPAE: use u32 instead of unsigned longfor 32-bit ptes
From: Russell King - ARM Linux
Date: Mon Nov 15 2010 - 12:36:36 EST
On Mon, Nov 15, 2010 at 09:39:30AM +0000, Catalin Marinas wrote:
> On 14 November 2010 15:14, Russell King - ARM Linux
> <linux@xxxxxxxxxxxxxxxx> wrote:
> > There will be compiler warnings because u32 is unsigned int, and we
> > print it as %08lx. Generic code cases pte values to (long long) and
> > prints them using %08llx. We should do the same.
>
> We still need some kind of macro because with LPAE we need %016llx
> since the phys address can go to 40-bit and there are some additional
> bits in the top word. Unless you'd like to always print 16 characters
> even for 32-bit ptes (or if there is some other printk magic I'm not
> aware of).
Eeh? %08llx prints 8 characters _minimum_. If it needs more to represent
the number, it will use more characters. You surely don't think generic
code is brain dead enough to cast something to a 64-bit long long and
then only print 32 bits of it???
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/