summaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/sidewinder.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2020-07-07 11:24:55 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-07-07 11:25:54 -0700
commit6f49c4f5b95b9ac8ead1ec39066489fb10fcbde8 (patch)
treea66fd2136d3b7deb8fe5553f963822d9861a79e0 /drivers/input/joystick/sidewinder.c
parent08a6caaed8c12a158e88c0e0e1369203f9cff020 (diff)
downloadlinux-6f49c4f5b95b9ac8ead1ec39066489fb10fcbde8.tar.gz
linux-6f49c4f5b95b9ac8ead1ec39066489fb10fcbde8.tar.bz2
linux-6f49c4f5b95b9ac8ead1ec39066489fb10fcbde8.zip
Input: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20200707180857.GA30600@embeddedor Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/joystick/sidewinder.c')
-rw-r--r--drivers/input/joystick/sidewinder.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c
index 1777e68c9f02..fac91ea14f17 100644
--- a/drivers/input/joystick/sidewinder.c
+++ b/drivers/input/joystick/sidewinder.c
@@ -656,16 +656,19 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv)
switch (i * m) {
case 60:
- sw->number++; /* fall through */
+ sw->number++;
+ fallthrough;
case 45: /* Ambiguous packet length */
if (j <= 40) { /* ID length less or eq 40 -> FSP */
case 43:
sw->type = SW_ID_FSP;
break;
}
- sw->number++; /* fall through */
+ sw->number++;
+ fallthrough;
case 30:
- sw->number++; /* fall through */
+ sw->number++;
+ fallthrough;
case 15:
sw->type = SW_ID_GP;
break;
@@ -681,9 +684,11 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv)
sw->type = SW_ID_PP;
break;
case 66:
- sw->bits = 3; /* fall through */
+ sw->bits = 3;
+ fallthrough;
case 198:
- sw->length = 22; /* fall through */
+ sw->length = 22;
+ fallthrough;
case 64:
sw->type = SW_ID_3DP;
if (j == 160)