[PATCH 10/11] macintosh/via-pmu: Clean up interrupt statistics

Geert Uytterhoeven geert at linux-m68k.org
Mon Jun 4 22:00:14 AEST 2018


Hi Finn,

On Sat, Jun 2, 2018 at 5:27 AM, Finn Thain <fthain at telegraphics.com.au> wrote:
> Replace an open-coded ffs() with the function call.
> Simplify an if-else cascade using a switch statement.
> Correct a typo and an indentation issue.
>
> Tested-by: Stan Johnson <userm57 at yahoo.com>
> Signed-off-by: Finn Thain <fthain at telegraphics.com.au>

Thanks for your patch!

Reviewed-by: Geert Uytterhoeven <geert at linux-m68k.org>

A few minor nits below...

> --- a/drivers/macintosh/via-pmu.c
> +++ b/drivers/macintosh/via-pmu.c

> @@ -1470,25 +1470,25 @@ pmu_handle_data(unsigned char *data, int len)
>                                 adb_input(data+1, len-1, 1);
>  #endif /* CONFIG_ADB */
>                 }
> -       }
> +               break;
>         /* Sound/brightness button pressed */
> -       else if ((1 << pirq) & PMU_INT_SNDBRT) {
> +       case PMU_INT_SNDBRT:
>  #ifdef CONFIG_PMAC_BACKLIGHT
>                 if (len == 3)
>                         pmac_backlight_set_legacy_brightness_pmu(data[1] >> 4);
>  #endif
> -       }
> +               break;

Please add a blank line after each "break" statement.

>         /* Tick interrupt */
> -       else if ((1 << pirq) & PMU_INT_TICK) {
> -               /* Environement or tick interrupt, query batteries */
> +       case PMU_INT_TICK:

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


More information about the Linuxppc-dev mailing list