Re: [PATCH] pinctrl: rza1: Remove unneeded spinlock acquisitions

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

 



Hi Geert,

On Wed, Mar 20, 2019 at 11:26:29AM +0100, Geert Uytterhoeven wrote:
> rza1_get_bit() is just a single register read.  Hence there's no need to
> synchronize it with other register writes to the same bank.
>

Thanks, no need to protect that single register access.
I assume you've been carrying this patch in your tree for your RSKRZA1
recent developments.

Acked-by: Jacopo Mondi <jacopo@xxxxxxxxxx>

Thanks
   j

> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
> To be queued in sh-pfc-for-v5.2.
>
>  drivers/pinctrl/pinctrl-rza1.c | 18 ++----------------
>  1 file changed, 2 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-rza1.c b/drivers/pinctrl/pinctrl-rza1.c
> index 9cfe9d0520acaf61..021e37b7689e4fda 100644
> --- a/drivers/pinctrl/pinctrl-rza1.c
> +++ b/drivers/pinctrl/pinctrl-rza1.c
> @@ -620,14 +620,7 @@ static void rza1_pin_reset(struct rza1_port *port, unsigned int pin)
>  static inline int rza1_pin_get_direction(struct rza1_port *port,
>  					 unsigned int pin)
>  {
> -	unsigned long irqflags;
> -	int input;
> -
> -	spin_lock_irqsave(&port->lock, irqflags);
> -	input = rza1_get_bit(port, RZA1_PM_REG, pin);
> -	spin_unlock_irqrestore(&port->lock, irqflags);
> -
> -	return !!input;
> +	return !!rza1_get_bit(port, RZA1_PM_REG, pin);
>  }
>
>  /**
> @@ -671,14 +664,7 @@ static inline void rza1_pin_set(struct rza1_port *port, unsigned int pin,
>
>  static inline int rza1_pin_get(struct rza1_port *port, unsigned int pin)
>  {
> -	unsigned long irqflags;
> -	int val;
> -
> -	spin_lock_irqsave(&port->lock, irqflags);
> -	val = rza1_get_bit(port, RZA1_PPR_REG, pin);
> -	spin_unlock_irqrestore(&port->lock, irqflags);
> -
> -	return val;
> +	return rza1_get_bit(port, RZA1_PPR_REG, pin);
>  }
>
>  /**
> --
> 2.17.1
>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux