[PATCH] pinctrl/at91: Fix mask creation in at91_gpio_dbg_show

Alexandre Belloni alexandre.belloni at free-electrons.com
Mon Apr 14 01:14:38 PDT 2014


On 11/04/2014 at 20:33:13 +0200, Alexander Stein wrote :
> pin_to_mask expects a bank pin number. So do not add the chip base.
> 
I would prefer that you add a description of the effects of the bug as
seen by the user.

> Signed-off-by: Alexander Stein <alexanders83 at web.de>
else
Acked-by: Alexandre Belloni <alexandre.belloni at free-electrons.com>

> ---
> Mark, thanks for the clarification that pin_to_mask only expects tha bank
> pin number. This wasn't obvious to me.
>  drivers/pinctrl/pinctrl-at91.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> index 63176f2..2da0e6e 100644
> --- a/drivers/pinctrl/pinctrl-at91.c
> +++ b/drivers/pinctrl/pinctrl-at91.c
> @@ -1205,8 +1205,7 @@ static void at91_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
>  	void __iomem *pio = at91_gpio->regbase;
>  
>  	for (i = 0; i < chip->ngpio; i++) {
> -		unsigned pin = chip->base + i;
> -		unsigned mask = pin_to_mask(pin);
> +		unsigned mask = pin_to_mask(i);
>  		const char *gpio_label;
>  		u32 pdsr;
>  
> -- 
> 1.9.2
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the linux-arm-kernel mailing list