aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2021-07-06 16:05:26 -0500
committerGustavo A. R. Silva <gustavoars@kernel.org>2021-07-06 16:26:17 -0500
commitf1469e568bf6dcbdff9fd7cd7d2cc9ca9d06efeb (patch)
tree1fac4d5a15e5a72280a52b18caa1dbbc30a8f3e9 /drivers/input/joystick
parentscsi: aic94xx: Fix fall-through warning for Clang (diff)
downloadlinux-dev-f1469e568bf6dcbdff9fd7cd7d2cc9ca9d06efeb.tar.xz
linux-dev-f1469e568bf6dcbdff9fd7cd7d2cc9ca9d06efeb.zip
Input: Fix fall-through warning for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough; statement. Notice that this seems to be a Duff device for performance[1]. So, although the code looks a bit _funny_, I didn't want to refactor or modify it beyond merely adding a fallthrough marking, which might be the least disruptive way to fix this issue. [1] https://www.drdobbs.com/a-reusable-duff-device/184406208 Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r--drivers/input/joystick/sidewinder.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c
index fac91ea14f17..8e9672deb1eb 100644
--- a/drivers/input/joystick/sidewinder.c
+++ b/drivers/input/joystick/sidewinder.c
@@ -660,6 +660,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv)
fallthrough;
case 45: /* Ambiguous packet length */
if (j <= 40) { /* ID length less or eq 40 -> FSP */
+ fallthrough;
case 43:
sw->type = SW_ID_FSP;
break;