Re: [PATCH 2/2] [ARM] tegra: gpio: coding style cleanups

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

 



On Tue, Jul 27, 2010 at 3:38 AM, Mike Rapoport <mike@xxxxxxxxxxxxxx> wrote:
> Signed-off-by: Mike Rapoport <mike@xxxxxxxxxxxxxx>
> ---
>  arch/arm/mach-tegra/gpio.c |   42 +++++++++++++++++++++---------------------
>  1 files changed, 21 insertions(+), 21 deletions(-)
>
> diff --git a/arch/arm/mach-tegra/gpio.c b/arch/arm/mach-tegra/gpio.c
> index 4c66574..38cc10d 100644
> --- a/arch/arm/mach-tegra/gpio.c
> +++ b/arch/arm/mach-tegra/gpio.c
> @@ -265,10 +265,10 @@ void tegra_gpio_resume(void)
>
>        local_irq_save(flags);
>
> -       for (b=0; b<ARRAY_SIZE(tegra_gpio_banks); b++) {
> +       for (b = 0; b < ARRAY_SIZE(tegra_gpio_banks); b++) {
>                struct tegra_gpio_bank *bank = &tegra_gpio_banks[b];
>
> -               for (p=0; p<ARRAY_SIZE(bank->oe); p++) {
> +               for (p = 0; p < ARRAY_SIZE(bank->oe); p++) {
>                        unsigned int gpio = (b<<5) | (p<<3);
>                        __raw_writel(bank->cnf[p], GPIO_CNF(gpio));
>                        __raw_writel(bank->out[p], GPIO_OUT(gpio));
> @@ -276,14 +276,14 @@ void tegra_gpio_resume(void)
>                        __raw_writel(bank->int_lvl[p], GPIO_INT_LVL(gpio));
>                        __raw_writel(bank->int_enb[p], GPIO_INT_ENB(gpio));
>                }
> -
>        }
>
>        local_irq_restore(flags);
>
> -       for (i=INT_GPIO_BASE; i<(INT_GPIO_BASE+TEGRA_NR_GPIOS); i++) {
> +       for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) {
>                struct irq_desc *desc = irq_to_desc(i);
> -               if (!desc || (desc->status & IRQ_WAKEUP)) continue;
> +               if (!desc || (desc->status & IRQ_WAKEUP))
> +                       continue;
>                enable_irq(i);
>        }
>  }
> @@ -293,23 +293,23 @@ void tegra_gpio_suspend(void)
>        unsigned long flags;
>        int b, p, i;
>
> -
> -       for (i=INT_GPIO_BASE; i<(INT_GPIO_BASE+TEGRA_NR_GPIOS); i++) {
> +       for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) {
>                struct irq_desc *desc = irq_to_desc(i);
> -               if (!desc) continue;
> +               if (!desc)
> +                       continue;
>                if (desc->status & IRQ_WAKEUP) {
>                        int gpio = i - INT_GPIO_BASE;
>                        pr_debug("gpio %d.%d is wakeup\n", gpio/8, gpio&7);
>                        continue;
> -                }
> +               }
>                disable_irq(i);
>        }
>
>        local_irq_save(flags);
> -       for (b=0; b<ARRAY_SIZE(tegra_gpio_banks); b++) {
> +       for (b = 0; b < ARRAY_SIZE(tegra_gpio_banks); b++) {
>                struct tegra_gpio_bank *bank = &tegra_gpio_banks[b];
>
> -               for (p=0; p<ARRAY_SIZE(bank->oe); p++) {
> +               for (p = 0; p < ARRAY_SIZE(bank->oe); p++) {
>                        unsigned int gpio = (b<<5) | (p<<3);
>                        bank->cnf[p] = __raw_readl(GPIO_CNF(gpio));
>                        bank->out[p] = __raw_readl(GPIO_OUT(gpio));
> @@ -317,7 +317,6 @@ void tegra_gpio_suspend(void)
>                        bank->int_enb[p] = __raw_readl(GPIO_INT_ENB(gpio));
>                        bank->int_lvl[p] = __raw_readl(GPIO_INT_LVL(gpio));
>                }
> -
>        }
>        local_irq_restore(flags);
>  }
> @@ -399,15 +398,16 @@ static int dbg_gpio_show(struct seq_file *s, void *unused)
>        for (i = 0; i < 7; i++) {
>                for (j = 0; j < 4; j++) {
>                        int gpio = tegra_gpio_compose(i, j, 0);
> -                       seq_printf(s, "%d:%d %02x %02x %02x %02x %02x %02x %06x\n",
> -                              i, j,
> -                              __raw_readl(GPIO_CNF(gpio)),
> -                              __raw_readl(GPIO_OE(gpio)),
> -                              __raw_readl(GPIO_OUT(gpio)),
> -                              __raw_readl(GPIO_IN(gpio)),
> -                              __raw_readl(GPIO_INT_STA(gpio)),
> -                              __raw_readl(GPIO_INT_ENB(gpio)),
> -                              __raw_readl(GPIO_INT_LVL(gpio)));
> +                       seq_printf(s,
> +                                  "%d:%d %02x %02x %02x %02x %02x %02x %06x\n",
> +                                  i, j,
> +                                  __raw_readl(GPIO_CNF(gpio)),
> +                                  __raw_readl(GPIO_OE(gpio)),
> +                                  __raw_readl(GPIO_OUT(gpio)),
> +                                  __raw_readl(GPIO_IN(gpio)),
> +                                  __raw_readl(GPIO_INT_STA(gpio)),
> +                                  __raw_readl(GPIO_INT_ENB(gpio)),
> +                                  __raw_readl(GPIO_INT_LVL(gpio)));
>                }
>        }
>        return 0;
> --
> 1.6.6.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

ACK - this will be in the patch I send for review
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux