Re: [PATCH v4 01/19] ARM: Make the argument to virt_to_phys()"const volatile"

From: Russell King - ARM Linux
Date: Tue Jan 25 2011 - 05:29:28 EST


On Tue, Jan 25, 2011 at 11:00:10AM +0100, Arnd Bergmann wrote:
> On Monday 24 January 2011, Stephen Boyd wrote:
> > On 01/24/2011 09:55 AM, Catalin Marinas wrote:
> > > Changing the virt_to_phys() argument to "const volatile void *" avoids
> > > compiler warnings in some situations where this function is used.
> > >
> > > Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxx>
> > > Cc: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>
> > > Cc: Arnd Bergmann <arnd@xxxxxxxx>
>
> Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
>
> > Acked-by: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>
> >
> > Any chance we can get this one patch into 2.6.38? It fixes a warning for
> > MSM.
>
> Stephen, you might want to have a look at why the warning even appears
> on MSM. Most uses of 'volatile' are misguided, and there could be an
> actual bug in there.

It's actually the right thing - look at x86's definition:

static inline phys_addr_t virt_to_phys(volatile void *address)
--
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/