linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] ARM: Fix sparse warnings due to variables conflicts.
       [not found] <1286517186-29934-1-git-send-email-sourav.poddar@ti.com>
@ 2010-10-08 11:32 ` Nishanth Menon
  2010-10-08 17:36   ` Tony Lindgren
  2010-10-08 23:22   ` Russell King - ARM Linux
  0 siblings, 2 replies; 6+ messages in thread
From: Nishanth Menon @ 2010-10-08 11:32 UTC (permalink / raw)
  To: linux-arm-kernel

Poddar, Sourav had written, on 10/08/2010 12:53 AM, the following:
> Fix the sparse warnings generated due to conflicts in variables used in readl/writel.
> 
> 
> drivers/net/smc91x.c:312:8: warning: symbol '__v' shadows an earlier one
> drivers/net/smc91x.c:312:8: originally declared here
> 
> With this change, about 200 sparse warnings are fixed.
The commit message could be a little more detailed.
see http://marc.info/?l=linux-omap&m=128648102511076&w=2

also should $subject say ARM: io: fix namespace conflict
to better reflect the fix? sparse warnings are just an indication IMHO

> 
> 
> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
> Signed-off-by: Charulatha V <charu@ti.com>
> ---
>  arch/arm/include/asm/io.h |   22 +++++++++++-----------
>  1 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
> index 1261b1f..2daecb6 100644
> --- a/arch/arm/include/asm/io.h
> +++ b/arch/arm/include/asm/io.h
> @@ -131,11 +131,11 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
>  #define outl(v,p)		__raw_writel((__force __u32) \
>  					cpu_to_le32(v),__io(p))
>  
> -#define inb(p)	({ __u8 __v = __raw_readb(__io(p)); __v; })
> -#define inw(p)	({ __u16 __v = le16_to_cpu((__force __le16) \
> -			__raw_readw(__io(p))); __v; })
> -#define inl(p)	({ __u32 __v = le32_to_cpu((__force __le32) \
> -			__raw_readl(__io(p))); __v; })
> +#define inb(p)	({ __u8 __inbv = __raw_readb(__io(p)); __inbv; })
> +#define inw(p)	({ __u16 __inwv = le16_to_cpu((__force __le16) \
> +			__raw_readw(__io(p))); __inwv; })
> +#define inl(p)	({ __u32 __inlv = le32_to_cpu((__force __le32) \
> +			__raw_readl(__io(p))); __inlv; })
>  
>  #define outsb(p,d,l)		__raw_writesb(__io(p),d,l)
>  #define outsw(p,d,l)		__raw_writesw(__io(p),d,l)
> @@ -200,9 +200,9 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
>  #define __iowmb()		do { } while (0)
>  #endif
>  
> -#define readb(c)		({ u8  __v = readb_relaxed(c); __iormb(); __v; })
> -#define readw(c)		({ u16 __v = readw_relaxed(c); __iormb(); __v; })
> -#define readl(c)		({ u32 __v = readl_relaxed(c); __iormb(); __v; })
> +#define readb(c)		({ u8  __readbv = readb_relaxed(c); __iormb(); __readbv; })
> +#define readw(c)		({ u16 __readwv = readw_relaxed(c); __iormb(); __readwv; })
> +#define readl(c)		({ u32 __readlv = readl_relaxed(c); __iormb(); __readlv; })
>  
>  #define writeb(v,c)		({ __iowmb(); writeb_relaxed(v,c); })
>  #define writew(v,c)		({ __iowmb(); writew_relaxed(v,c); })
> @@ -258,9 +258,9 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
>   * io{read,write}{8,16,32} macros
>   */
>  #ifndef ioread8
> -#define ioread8(p)	({ unsigned int __v = __raw_readb(p); __iormb(); __v; })
> -#define ioread16(p)	({ unsigned int __v = le16_to_cpu((__force __le16)__raw_readw(p)); __iormb(); __v; })
> -#define ioread32(p)	({ unsigned int __v = le32_to_cpu((__force __le32)__raw_readl(p)); __iormb(); __v; })
> +#define ioread8(p)	({ unsigned int __ioread8v = __raw_readb(p); __iormb(); __ioread8v; })
> +#define ioread16(p)	({ unsigned int __ioread16v = le16_to_cpu((__force __le16)__raw_readw(p)); __iormb(); __ioread16v; })
> +#define ioread32(p)	({ unsigned int __ioread32v = le32_to_cpu((__force __le32)__raw_readl(p)); __iormb(); __ioread32v; })
>  
>  #define iowrite8(v,p)	({ __iowmb(); (void)__raw_writeb(v, p); })
>  #define iowrite16(v,p)	({ __iowmb(); (void)__raw_writew((__force __u16)cpu_to_le16(v), p); })


-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v4] ARM: Fix sparse warnings due to variables conflicts.
  2010-10-08 11:32 ` [PATCH v4] ARM: Fix sparse warnings due to variables conflicts Nishanth Menon
@ 2010-10-08 17:36   ` Tony Lindgren
  2010-10-11  3:44     ` G, Manjunath Kondaiah
  2010-10-08 23:22   ` Russell King - ARM Linux
  1 sibling, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2010-10-08 17:36 UTC (permalink / raw)
  To: linux-arm-kernel

* Nishanth Menon <nm@ti.com> [101008 04:24]:
> Poddar, Sourav had written, on 10/08/2010 12:53 AM, the following:
> >Fix the sparse warnings generated due to conflicts in variables used in readl/writel.
> >
> >
> >drivers/net/smc91x.c:312:8: warning: symbol '__v' shadows an earlier one
> >drivers/net/smc91x.c:312:8: originally declared here
> >
> >With this change, about 200 sparse warnings are fixed.
> The commit message could be a little more detailed.
> see http://marc.info/?l=linux-omap&m=128648102511076&w=2
> 
> also should $subject say ARM: io: fix namespace conflict
> to better reflect the fix? sparse warnings are just an indication IMHO

BTW, also dropping the "OMAP: Convert write/read functions to raw read/write".

That patch does not compute, and also ends up leaving files with
__raw_readw followed by writew..

Regards,

Tony

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v4] ARM: Fix sparse warnings due to variables conflicts.
  2010-10-08 11:32 ` [PATCH v4] ARM: Fix sparse warnings due to variables conflicts Nishanth Menon
  2010-10-08 17:36   ` Tony Lindgren
@ 2010-10-08 23:22   ` Russell King - ARM Linux
  2010-10-11  5:45     ` Varadarajan, Charulatha
  2010-10-14  4:36     ` Sourav Poddar
  1 sibling, 2 replies; 6+ messages in thread
From: Russell King - ARM Linux @ 2010-10-08 23:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Oct 08, 2010 at 06:32:29AM -0500, Nishanth Menon wrote:
> Poddar, Sourav had written, on 10/08/2010 12:53 AM, the following:
>> Fix the sparse warnings generated due to conflicts in variables used in readl/writel.
>>
>>
>> drivers/net/smc91x.c:312:8: warning: symbol '__v' shadows an earlier one
>> drivers/net/smc91x.c:312:8: originally declared here
>>
>> With this change, about 200 sparse warnings are fixed.
> The commit message could be a little more detailed.
> see http://marc.info/?l=linux-omap&m=128648102511076&w=2
>
> also should $subject say ARM: io: fix namespace conflict
> to better reflect the fix? sparse warnings are just an indication IMHO

afaics, this patch will cause checkpatch to issue warnings due to lines
over 80 characters.

I can't check that because I don't have the original patch via the
linux-arm-kernel mailing list.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v4] ARM: Fix sparse warnings due to variables conflicts.
  2010-10-08 17:36   ` Tony Lindgren
@ 2010-10-11  3:44     ` G, Manjunath Kondaiah
  0 siblings, 0 replies; 6+ messages in thread
From: G, Manjunath Kondaiah @ 2010-10-11  3:44 UTC (permalink / raw)
  To: linux-arm-kernel

Tony,

> -----Original Message-----
> From: Tony Lindgren [mailto:tony at atomide.com] 
> Sent: Friday, October 08, 2010 11:06 PM
> To: Menon, Nishanth
> Cc: Poddar, Sourav; linux-omap at vger.kernel.org; 
> linux-arm-kernel at lists.infradead.org; Shilimkar, Santosh; G, 
> Manjunath Kondaiah; Varadarajan, Charulatha
> Subject: Re: [PATCH v4] ARM: Fix sparse warnings due to 
> variables conflicts.
> 
> * Nishanth Menon <nm@ti.com> [101008 04:24]:
> > Poddar, Sourav had written, on 10/08/2010 12:53 AM, the following:
> > >Fix the sparse warnings generated due to conflicts in 
> variables used in readl/writel.
> > >
> > >
> > >drivers/net/smc91x.c:312:8: warning: symbol '__v' shadows 
> an earlier 
> > >one
> > >drivers/net/smc91x.c:312:8: originally declared here
> > >
> > >With this change, about 200 sparse warnings are fixed.
> > The commit message could be a little more detailed.
> > see http://marc.info/?l=linux-omap&m=128648102511076&w=2
> > 
> > also should $subject say ARM: io: fix namespace conflict to better 
> > reflect the fix? sparse warnings are just an indication IMHO
> 
> BTW, also dropping the "OMAP: Convert write/read functions to 
> raw read/write".
> 
> That patch does not compute, and also ends up leaving files 
> with __raw_readw followed by writew..
> 

Why to revert patch "OMAP: Convert write/read functions to raw read/write" 
since we need to replace other __raw_read/__raw_writel functions if above 
patch gets accepted.

-Manjunath

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v4] ARM: Fix sparse warnings due to variables conflicts.
  2010-10-08 23:22   ` Russell King - ARM Linux
@ 2010-10-11  5:45     ` Varadarajan, Charulatha
  2010-10-14  4:36     ` Sourav Poddar
  1 sibling, 0 replies; 6+ messages in thread
From: Varadarajan, Charulatha @ 2010-10-11  5:45 UTC (permalink / raw)
  To: linux-arm-kernel

 

> -----Original Message-----
> From: Russell King - ARM Linux [mailto:linux at arm.linux.org.uk] 
> Sent: Saturday, October 09, 2010 4:53 AM
> To: Menon, Nishanth
> Cc: Poddar, Sourav; G, Manjunath Kondaiah; 
> linux-omap at vger.kernel.org; Shilimkar, Santosh; 
> linux-arm-kernel at lists.infradead.org; Varadarajan, Charulatha
> Subject: Re: [PATCH v4] ARM: Fix sparse warnings due to 
> variables conflicts.
> 
> On Fri, Oct 08, 2010 at 06:32:29AM -0500, Nishanth Menon wrote:
> > Poddar, Sourav had written, on 10/08/2010 12:53 AM, the following:
> >> Fix the sparse warnings generated due to conflicts in 
> variables used in readl/writel.
> >>
> >>
> >> drivers/net/smc91x.c:312:8: warning: symbol '__v' shadows 
> an earlier one
> >> drivers/net/smc91x.c:312:8: originally declared here
> >>
> >> With this change, about 200 sparse warnings are fixed.
> > The commit message could be a little more detailed.
> > see http://marc.info/?l=linux-omap&m=128648102511076&w=2
> >
> > also should $subject say ARM: io: fix namespace conflict
> > to better reflect the fix? sparse warnings are just an 
> indication IMHO

That sounds more appropriate. Thanks.

> 
> afaics, this patch will cause checkpatch to issue warnings 
> due to lines
> over 80 characters.

Okay. The patch was not touching the coding style of how the
macros were defined earlier. Anyways, would fix the warnings
and send the patch asap.

> 
> I can't check that because I don't have the original patch via the
> linux-arm-kernel mailing list.
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v4] ARM: Fix sparse warnings due to variables conflicts.
  2010-10-08 23:22   ` Russell King - ARM Linux
  2010-10-11  5:45     ` Varadarajan, Charulatha
@ 2010-10-14  4:36     ` Sourav Poddar
  1 sibling, 0 replies; 6+ messages in thread
From: Sourav Poddar @ 2010-10-14  4:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 09 October 2010 04:52 AM, Russell King - ARM Linux wrote:
> On Fri, Oct 08, 2010 at 06:32:29AM -0500, Nishanth Menon wrote:
>    
>> Poddar, Sourav had written, on 10/08/2010 12:53 AM, the following:
>>      
>>> Fix the sparse warnings generated due to conflicts in variables used in readl/writel.
>>>
>>>
>>> drivers/net/smc91x.c:312:8: warning: symbol '__v' shadows an earlier one
>>> drivers/net/smc91x.c:312:8: originally declared here
>>>
>>> With this change, about 200 sparse warnings are fixed.
>>>        
>> The commit message could be a little more detailed.
>> see http://marc.info/?l=linux-omap&m=128648102511076&w=2
>>
>> also should $subject say ARM: io: fix namespace conflict
>> to better reflect the fix? sparse warnings are just an indication IMHO
>>      
> afaics, this patch will cause checkpatch to issue warnings due to lines
> over 80 characters.
>
> I can't check that because I don't have the original patch via the
> linux-arm-kernel mailing list.
>    
     Hi,

      I have posted a new patch with  the checkpatch issues fixed.
      Link to this patch is:
         http://marc.info/?l=linux-arm-kernel&m=128697013901237&w=2

      Regards,
      Sourav

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-10-14  4:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1286517186-29934-1-git-send-email-sourav.poddar@ti.com>
2010-10-08 11:32 ` [PATCH v4] ARM: Fix sparse warnings due to variables conflicts Nishanth Menon
2010-10-08 17:36   ` Tony Lindgren
2010-10-11  3:44     ` G, Manjunath Kondaiah
2010-10-08 23:22   ` Russell King - ARM Linux
2010-10-11  5:45     ` Varadarajan, Charulatha
2010-10-14  4:36     ` Sourav Poddar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).