summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-lpc18xx.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-08-15 12:10:35 -0500
committerLinus Walleij <linus.walleij@linaro.org>2018-08-29 13:47:16 +0200
commitd290e096d2a59c655b3c718aa17bb8864bb6fa5e (patch)
treef99ff5a44f28a242a54790f43e85f9a13611688f /drivers/pinctrl/pinctrl-lpc18xx.c
parent375fef591696069a423223b6110f2dd79427a713 (diff)
pinctrl: lpc18xx: mark expected switch fall-throughs
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>
Diffstat (limited to 'drivers/pinctrl/pinctrl-lpc18xx.c')
-rw-r--r--drivers/pinctrl/pinctrl-lpc18xx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-lpc18xx.c b/drivers/pinctrl/pinctrl-lpc18xx.c
index 190f17e4bbda..a14bc5e5fc24 100644
--- a/drivers/pinctrl/pinctrl-lpc18xx.c
+++ b/drivers/pinctrl/pinctrl-lpc18xx.c
@@ -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: