RE: [PATCH v2 09/10] OMAP2/3: Convert write/read functions to raw read/write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2010-10-25 at 11:04 +0530, G, Manjunath Kondaiah wrote:
> David,
> 
> > -----Original Message-----
> > From: David Woodhouse [mailto:dwmw2@xxxxxxxxxxxxx] 
> > Sent: Monday, October 25, 2010 5:32 AM
> > To: Menon, Nishanth
> > Cc: Russell King - ARM Linux; G, Manjunath Kondaiah; 
> > linux-omap@xxxxxxxxxxxxxxx; linux-mtd@xxxxxxxxxxxxxxxxxxx; 
> > linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> > Subject: Re: [PATCH v2 09/10] OMAP2/3: Convert write/read 
> > functions to raw read/write
> > 
> > On Thu, 2010-10-07 at 14:50 -0500, Nishanth Menon wrote:
> > > my comment being that by moving {read,write}[wlb] to __raw versions 
> > > dont solve the real issue of namespace here. fix should be in 
> > > arch/arm/include/asm/io.h IMHO. so that there are no 
> > overlaps as this.
> > 
> > Indeed. This patch is complete nonsense.
> 
> nonsense? There are two types of fixes proposed to fix these sparse warnings.
> 1. with this patch
> 2. fixing in io.h
> https://patchwork.kernel.org/patch/250171/
> 
> 1st option is already merged with 2.6.37 merge window.
> 
> If 2 get accepted, all __raw_read/write will get replaced with readl/writel.
> 
> Apart from those two, do you have any other alternate idea to fix these sparse warnings?

The latter is obviously the better approach. The problem that sparse is
complaining about is the fact that you have two nested C blocks, both of
which contain a local variable called '__v'. By changing the variable
names so that they're actually unique, we fix the real problem.

The answer is not that *all* drivers which call cpu_to_le16(readw())
must be changed, which is what you seem to have assumed. And you
*certainly* can't change them to use __raw_readw(), which has
*different* semantics (and endianness in some cases), without a clear
comment in the changelog entry saying *why* that change was OK.

-- 
dwmw2

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux