Re: [PATCH 10/11] macintosh/via-pmu: Clean up interrupt statistics
From: Geert Uytterhoeven
Date: Mon Jun 04 2018 - 08:00:22 EST
Hi Finn,
On Sat, Jun 2, 2018 at 5:27 AM, Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxx>
> Signed-off-by: Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx>
Thanks for your patch!
Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxx
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