[PATCH RESEND] ARM: io: fix namespace conflicts

Varadarajan, Charulatha charu at ti.com
Wed Dec 8 07:33:02 EST 2010


Russell,

On Fri, Dec 3, 2010 at 12:04, Sourav Poddar <sourav.poddar at ti.com> wrote:
> Having __v as the variable name for the definition of different macros leads
> to the namespace pollution. For example,
> readl(p)
> unrolls to:
> ({ u32 __v = ({ u32 __v = (( __u32)(__le32)(( __le32) ((void)0,
> *(volatile unsigned int *)((p))))); __v; }); __asm__ __volatile__ ("mcr
> p15,
> , %0, c7, c10, 5" : : "r" (0) : "memory"); __v; });
>
> ({ u32 __v = ({ u32 __v
> causes sparse warning: "warning: symbol '__v' shadows an earlier one"
>
> Using variable names which use the function name prefix across the
> various macros avoids the namespace pollution.
>
> With this change, ~200 sparse warnings in omap2plus_defconfig build are
> fixed.
>
> Signed-off-by: Sourav Poddar <sourav.poddar at ti.com>
> Signed-off-by: Charulatha V <charu at ti.com>
> Reviewed by: Nishanth Menon <nm at ti.com>
> ---
> Links related to previous discussions are as follows:
> https://patchwork.kernel.org/patch/250171/
> http://www.spinics.net/lists/linux-omap/msg38569.html
> http://marc.info/?t=128506336700011&r=1&w=2
>
> arch/arm/include/asm/io.h |   32 +++++++++++++++++++++-----------
>  1 files changed, 21 insertions(+), 11 deletions(-)
>

If no comments, pls ack this patch.

Thanks,
V Charulatha



More information about the linux-arm-kernel mailing list