All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 02/14] misc/ep93xx_pwm: use {read,write}* instead of __raw_* versions for io
@ 2013-05-24 23:21 H Hartley Sweeten
  2013-05-27 15:18 ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: H Hartley Sweeten @ 2013-05-24 23:21 UTC (permalink / raw)
  To: Linux Kernel; +Cc: arnd, gregkh, Ryan Mallon, mcrapet, hsweeten

The mmio_base is an ioremap'ed memory resource. The normal memory
io functions should be used not the __raw_* versions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Matthieu Crapet <mcrapet@gmail.com>
---
 drivers/misc/ep93xx_pwm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/ep93xx_pwm.c b/drivers/misc/ep93xx_pwm.c
index 36370b4..af01fb9 100644
--- a/drivers/misc/ep93xx_pwm.c
+++ b/drivers/misc/ep93xx_pwm.c
@@ -42,13 +42,13 @@ struct ep93xx_pwm {
 static inline void ep93xx_pwm_writel(struct ep93xx_pwm *pwm,
 		unsigned int val, unsigned int off)
 {
-	__raw_writel(val, pwm->mmio_base + off);
+	writel(val, pwm->mmio_base + off);
 }
 
 static inline unsigned int ep93xx_pwm_readl(struct ep93xx_pwm *pwm,
 		unsigned int off)
 {
-	return __raw_readl(pwm->mmio_base + off);
+	return readl(pwm->mmio_base + off);
 }
 
 static inline void ep93xx_pwm_write_tc(struct ep93xx_pwm *pwm, u16 value)
-- 
1.8.1.4


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

* Re: [PATCH 02/14] misc/ep93xx_pwm: use {read,write}* instead of __raw_* versions for io
  2013-05-24 23:21 [PATCH 02/14] misc/ep93xx_pwm: use {read,write}* instead of __raw_* versions for io H Hartley Sweeten
@ 2013-05-27 15:18 ` Arnd Bergmann
  2013-05-27 16:17   ` H Hartley Sweeten
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2013-05-27 15:18 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: Linux Kernel, gregkh, Ryan Mallon, mcrapet, hsweeten

On Saturday 25 May 2013, H Hartley Sweeten wrote:
> @@ -42,13 +42,13 @@ struct ep93xx_pwm {
>  static inline void ep93xx_pwm_writel(struct ep93xx_pwm *pwm,
>                 unsigned int val, unsigned int off)
>  {
> -       __raw_writel(val, pwm->mmio_base + off);
> +       writel(val, pwm->mmio_base + off);
>  }

Just an idea: since you are adding the writel in a lot of places in subsequent
patches, you could rename 'mmio_base' to the shorter 'base' first, which would
make the resulting code actually smaller.

	Arnd

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

* RE: [PATCH 02/14] misc/ep93xx_pwm: use {read,write}* instead of __raw_* versions for io
  2013-05-27 15:18 ` Arnd Bergmann
@ 2013-05-27 16:17   ` H Hartley Sweeten
  2013-05-27 17:07     ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: H Hartley Sweeten @ 2013-05-27 16:17 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Linux Kernel, gregkh@linuxfoundation.org, Ryan Mallon,
	mcrapet@gmail.com

On Monday, May 27, 2013 8:18 AM, Arnd Bergmann wrote:
> On Saturday 25 May 2013, H Hartley Sweeten wrote:
>> @@ -42,13 +42,13 @@ struct ep93xx_pwm {
>>  static inline void ep93xx_pwm_writel(struct ep93xx_pwm *pwm,
>>                 unsigned int val, unsigned int off)
>>  {
>> -       __raw_writel(val, pwm->mmio_base + off);
>> +       writel(val, pwm->mmio_base + off);
>>  }
>
> Just an idea: since you are adding the writel in a lot of places in subsequent
> patches, you could rename 'mmio_base' to the shorter 'base' first, which would
> make the resulting code actually smaller.

Hmm.. It would make the source file a bit smaller but the compiled size would
be the same.

But, I'll probably rename the variable when I convert this driver to the PWM
framework.

Thanks,
Hartley

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

* Re: [PATCH 02/14] misc/ep93xx_pwm: use {read,write}* instead of __raw_* versions for io
  2013-05-27 16:17   ` H Hartley Sweeten
@ 2013-05-27 17:07     ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2013-05-27 17:07 UTC (permalink / raw)
  To: H Hartley Sweeten
  Cc: Linux Kernel, gregkh@linuxfoundation.org, Ryan Mallon,
	mcrapet@gmail.com

On Monday 27 May 2013, H Hartley Sweeten wrote:
> On Monday, May 27, 2013 8:18 AM, Arnd Bergmann wrote:
> > On Saturday 25 May 2013, H Hartley Sweeten wrote:
> >> @@ -42,13 +42,13 @@ struct ep93xx_pwm {
> >>  static inline void ep93xx_pwm_writel(struct ep93xx_pwm *pwm,
> >>                 unsigned int val, unsigned int off)
> >>  {
> >> -       __raw_writel(val, pwm->mmio_base + off);
> >> +       writel(val, pwm->mmio_base + off);
> >>  }
> >
> > Just an idea: since you are adding the writel in a lot of places in subsequent
> > patches, you could rename 'mmio_base' to the shorter 'base' first, which would
> > make the resulting code actually smaller.
> 
> Hmm.. It would make the source file a bit smaller but the compiled size would
> be the same.

Right.

> But, I'll probably rename the variable when I convert this driver to the PWM
> framework.

Ok.

	Arnd


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

end of thread, other threads:[~2013-05-27 17:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-24 23:21 [PATCH 02/14] misc/ep93xx_pwm: use {read,write}* instead of __raw_* versions for io H Hartley Sweeten
2013-05-27 15:18 ` Arnd Bergmann
2013-05-27 16:17   ` H Hartley Sweeten
2013-05-27 17:07     ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.