[PATCH v3] amba: consolidate PrimeCell magic
Linus Walleij
linus.walleij at linaro.org
Thu Aug 18 03:56:14 EDT 2011
On Wed, Aug 17, 2011 at 8:49 PM, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Wed, Aug 17, 2011 at 12:03:57PM -0500, H Hartley Sweeten wrote:
>> > + cellid = amba_get_pid((void __iomem *)((u32)base & PAGE_MASK), SZ_4K);
>>
>> This produces a sparse warning. But, the same warning was present with the
>> old code.
>>
>> arch/arm/common/vic.c:353:49: warning: cast removes address space of expression
>
> That's prabably because casting from a pointer to a u32 (unsigned int)
> isn't the best thing to do. Casting to unsigned long is much better,
> and iirc doesn't provoke such a sparse warning.
Yep it's correct, sparse is silent on me now, posting v4.
Thanks!
Linus Walleij
More information about the linux-arm-kernel
mailing list