linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dwmw2@infradead.org (David Woodhouse)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 09/10] OMAP2/3: Convert write/read functions to raw read/write
Date: Mon, 25 Oct 2010 11:11:30 +0100	[thread overview]
Message-ID: <1288001490.26820.46.camel@i7.infradead.org> (raw)
In-Reply-To: <E0D41E29EB0DAC4E9F3FF173962E9E9402DBDDEFAA@dbde02.ent.ti.com>

On Mon, 2010-10-25 at 11:04 +0530, G, Manjunath Kondaiah wrote:
> David,
> 
> > -----Original Message-----
> > From: David Woodhouse [mailto:dwmw2 at infradead.org] 
> > Sent: Monday, October 25, 2010 5:32 AM
> > To: Menon, Nishanth
> > Cc: Russell King - ARM Linux; G, Manjunath Kondaiah; 
> > linux-omap at vger.kernel.org; linux-mtd at lists.infradead.org; 
> > linux-arm-kernel at lists.infradead.org
> > 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

  reply	other threads:[~2010-10-25 10:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1285063280-4057-1-git-send-email-manjugk@ti.com>
     [not found] ` <1285063280-4057-8-git-send-email-manjugk@ti.com>
2010-09-27 11:07   ` [PATCH v2 07/10] TWL CORE: Fix sparse warning Samuel Ortiz
     [not found] ` <1285063280-4057-9-git-send-email-manjugk@ti.com>
2010-09-27 11:16   ` [PATCH v2 08/10] TWL IRQ: Fix fucntion declaration warnings Samuel Ortiz
2010-09-27 13:10     ` G, Manjunath Kondaiah
2010-09-27 13:49       ` G, Manjunath Kondaiah
2010-09-27 14:46         ` Samuel Ortiz
     [not found] ` <1285063280-4057-4-git-send-email-manjugk@ti.com>
2010-09-29 21:35   ` [PATCH v2 03/10] OMAP: mach-omap2: Fix static function warnings Paul Walmsley
2010-09-29 23:49     ` G, Manjunath Kondaiah
     [not found] ` <1285063280-4057-10-git-send-email-manjugk@ti.com>
2010-10-07 12:17   ` [PATCH v2 09/10] OMAP2/3: Convert write/read functions to raw read/write Menon, Nishanth
2010-10-07 18:56     ` Russell King - ARM Linux
2010-10-07 19:50       ` Nishanth Menon
2010-10-25  0:01         ` David Woodhouse
2010-10-25  5:34           ` G, Manjunath Kondaiah
2010-10-25 10:11             ` David Woodhouse [this message]
2010-10-25  7:54           ` Artem Bityutskiy
2010-10-07 17:39   ` Vimal Singh
     [not found] ` <1285063280-4057-2-git-send-email-manjugk@ti.com>
2010-10-08 20:12   ` [PATCH v2 01/10] OMAP: mach-omap2: Fix incorrect assignment warnings Kevin Hilman
2010-10-11  3:51     ` G, Manjunath Kondaiah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288001490.26820.46.camel@i7.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).