[PATCH] locomo: replace locomo_{readl/writel} macros with __raw_{readw/writew}

H Hartley Sweeten hartleys at visionengravers.com
Tue Mar 9 12:13:32 EST 2010


On Tuesday, March 09, 2010 6:26 AM, Eric Miao wrote:
> On Tue, Mar 9, 2010 at 8:18 AM, H Hartley Sweeten
> <hartleys at 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 at visionengravers.com>
>> Cc: Russell King <linux at arm.linux.org.uk>
>> Cc: Eric Miao <eric.y.miao at gmail.com>
>>
>
> Hey Hartley,
>
> Could you please rebase this on top of my 'devel' branch?

Not a problem... Where can I git it?

This patch was generated from the linux-next tree, which was
the only one I could find with your irq cleanup patches in it.

> And note locomo_{read,write}l() may also be used in sub-device
> drivers like keyboard, LEDs and etc.

$ git grep --name-only -e 'locomo_readl' --or -e 'locomo_writel'
arch/arm/common/locomo.c
arch/arm/include/asm/hardware/locomo.h
drivers/input/keyboard/locomokbd.c
drivers/leds/leds-locomo.c
drivers/video/backlight/locomolcd.c

I believe I covered all in-tree users.  I guess I should have included
a diffstat.

$ git diff --stat
 arch/arm/common/locomo.c               |  229 ++++++++++++++++----------------
 arch/arm/include/asm/hardware/locomo.h |    3 -
 drivers/input/keyboard/locomokbd.c     |   26 ++--
 drivers/leds/leds-locomo.c             |    4 +-
 drivers/video/backlight/locomolcd.c    |   10 +-
 5 files changed, 135 insertions(+), 137 deletions(-)

If you know of any out-of-tree users of the macros I guess it would be better to
leave them in the header and mark them as deprecated for a while.  I just don't
know how to do that with a macro, other than just adding a comment.

Regards,
Hartley



More information about the linux-arm-kernel mailing list