linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: pavel@ucw.cz (Pavel Machek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] locomo: replace locomo_{readl/writel} macros with __raw_{readw/writew}
Date: Tue, 16 Mar 2010 07:25:14 +0100	[thread overview]
Message-ID: <20100316062514.GA1528@ucw.cz> (raw)
In-Reply-To: <0D753D10438DA54287A00B027084269763682CDA12@AUSP01VMBX24.collaborationhost.net>

On Tue 2010-03-09 11:25:44, H Hartley Sweeten wrote:
> On Tuesday, March 09, 2010 6:26 AM, Eric Miao wrote:
> > On Tue, Mar 9, 2010 at 8:18 AM, H Hartley Sweeten
> > <hartleys@visionengravers.com> wrote:
> >> The locomo_readl and locomo_writel macros are misnamed. Both
> >> use (*(volatile u16 *)(addr)) so they should be a *w variety.
> >>
> >> Instead of renaming the macros just replace them tree wide with
> >> __raw_readw and __raw_writew.
> >>
> >> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> >> Cc: Russell King <linux@arm.linux.org.uk>
> >> Cc: Eric Miao <eric.y.miao@gmail.com>
> >>
> >
> > Hey Hartley,
> >
> > Could you please rebase this on top of my 'devel' branch? And note
> > locomo_{read,write}l() may also be used in sub-device drivers like
> > keyboard, LEDs and etc.
> 
> Follow up to my previous reply.
> 
> If there are out-of-tree users of locomo_writel and locomo_readl, the
> following should allow leaving the macros temporarily and get them to
> switch.
> 
> When I rebase to your devel branch I can include this if you think it
> is necessary.

> -#define locomo_writel(val,addr)	({ *(volatile u16 *)(addr) = (val); })
> -#define locomo_readl(addr)	(*(volatile u16 *)(addr))
> +static inline void __deprecated locomo_writel(u16 val, void __iomem *addr)
> +{
> +	/* deprecated; use the function below instead */
> +	__raw_writew(val, addr);
> +}

I'm not sure if we want people to commonly use function begining with
__raw_. Normally, such functions are think-twice internal-only...

Why not readw()/writew()?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2010-03-16  6:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09  0:18 [PATCH] locomo: replace locomo_{readl/writel} macros with __raw_{readw/writew} H Hartley Sweeten
2010-03-09 13:26 ` Eric Miao
2010-03-09 17:13   ` H Hartley Sweeten
2010-03-09 17:25   ` H Hartley Sweeten
2010-03-16  6:25     ` Pavel Machek [this message]
2010-03-10  1:21   ` H Hartley Sweeten
2010-03-10  8:03     ` Eric Miao

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=20100316062514.GA1528@ucw.cz \
    --to=pavel@ucw.cz \
    --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).