pinctrl: lpc18xx: mark expected switch fall-throughs
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Wed, 15 Aug 2018 17:10:35 +0000 (12:10 -0500)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 29 Aug 2018 11:47:16 +0000 (13:47 +0200)
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 1292308 ("Missing break in switch")
Addresses-Coverity-ID: 1292309 ("Missing break in switch")
Addresses-Coverity-ID: 1309546 ("Missing break in switch")
Addresses-Coverity-ID: 1357369 ("Missing break in switch")
Addresses-Coverity-ID: 1357389 ("Missing break in switch")
Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-lpc18xx.c

index 190f17e4bbdafd287b9dd8d9cdeee4011f80c6c5..a14bc5e5fc248b19dd0e06a7e13c28e06dbffe8d 100644 (file)
@@ -844,8 +844,11 @@ static int lpc18xx_pconf_get_pin(struct pinctrl_dev *pctldev, unsigned param,
                *arg = (reg & LPC18XX_SCU_PIN_EHD_MASK) >> LPC18XX_SCU_PIN_EHD_POS;
                switch (*arg) {
                case 3: *arg += 5;
+                       /* fall through */
                case 2: *arg += 5;
+                       /* fall through */
                case 1: *arg += 3;
+                       /* fall through */
                case 0: *arg += 4;
                }
                break;
@@ -1060,8 +1063,11 @@ static int lpc18xx_pconf_set_pin(struct pinctrl_dev *pctldev, unsigned param,
 
                switch (param_val) {
                case 20: param_val -= 5;
+                        /* fall through */
                case 14: param_val -= 5;
+                        /* fall through */
                case  8: param_val -= 3;
+                        /* fall through */
                case  4: param_val -= 4;
                         break;
                default: