Subject: [PATCH v4 02/11] gpio: pxa: clean code with same variable name

From: [email-masked] (Igor Grinberg)
Date: Wed, 20 Feb 2013 10:13:54 +0200

On 02/19/13 18:22, Haojian Zhuang wrote:
> Clean code to avoid similar variable. Now use gc for gpio_chip,
> and use c/chip for pxa_gpio_chip. It's used to avoid confusion.
> 
> Signed-off-by: Haojian Zhuang <[email-masked]>

Tested-by: Igor Grinberg <[email-masked]>

Minor issue below for your consideration.

> ---
>  drivers/gpio/gpio-pxa.c |  102 +++++++++++++++++++++++------------------------
>  1 file changed, 50 insertions(+), 52 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
> index a4c6687..e611bed 100644
> --- a/drivers/gpio/gpio-pxa.c
> +++ b/drivers/gpio/gpio-pxa.c

[...]

> @@ -147,7 +147,7 @@ static inline int __gpio_is_occupied(unsigned gpio)
>  	int ret, af = 0, dir = 0;
>  
>  	pxachip = gpio_to_pxachip(gpio);
> -	base = gpio_chip_base(&pxachip->chip);
> +	base = gpio_chip_base(&pxachip->gc);

I don't mind leaving this as it is, but according
to your commit message, the above should be:
c/chip = gpio_to_pxachip(gpio);
base = gpio_chip_base(&c/chip->gc);

For your consideration.

>  	gpdr = readl_relaxed(base + GPDR_OFFSET);
>  
>  	switch (gpio_type) {

[...]

-- 
Regards,
Igor.