Thread (20 messages) 20 messages, 2 authors, 2018-06-07

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

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2018-06-04 12:00:18
Also in: lkml

Hi Finn,

On Sat, Jun 2, 2018 at 5:27 AM, Finn Thain [off-list ref] 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 <redacted>
Signed-off-by: Finn Thain <redacted>
Thanks for your patch!

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

A few minor nits below...
quoted hunk ↗ jump to hunk
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
quoted hunk ↗ jump to hunk
@@ -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@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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help