aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2018-08-06 18:31:02 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-08-08 14:23:27 -0400
commit17a4ed5545c5599852a5d75c5fb2c8e597943f99 (patch)
treed852233dfd7fd8de887eea7ee0afcd71bc61ebc6
parent6cad4e269e25dddd7260a53e9d9d90ba3a3cc35a (diff)
Input: mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Warning level 2 was used: -Wimplicit-fallthrough=2 Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/joystick/db9.c5
-rw-r--r--drivers/input/keyboard/adp5589-keys.c1
-rw-r--r--drivers/input/mouse/appletouch.c1
-rw-r--r--drivers/input/mouse/cyapa_gen5.c1
-rw-r--r--drivers/input/mouse/cyapa_gen6.c1
-rw-r--r--drivers/input/mouse/elantech.c2
-rw-r--r--drivers/input/mouse/sermouse.c4
-rw-r--r--drivers/input/touchscreen/elo.c1
8 files changed, 14 insertions, 2 deletions
diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c
index 7721cc0bf569..804b1b80a8be 100644
--- a/drivers/input/joystick/db9.c
+++ b/drivers/input/joystick/db9.c
@@ -259,6 +259,7 @@ static unsigned char db9_saturn_read_packet(struct parport *port, unsigned char
259 db9_saturn_write_sub(port, type, 3, powered, 0); 259 db9_saturn_write_sub(port, type, 3, powered, 0);
260 return data[0] = 0xe3; 260 return data[0] = 0xe3;
261 } 261 }
262 /* else: fall through */
262 default: 263 default:
263 return data[0]; 264 return data[0];
264 } 265 }
@@ -278,11 +279,14 @@ static int db9_saturn_report(unsigned char id, unsigned char data[60], struct in
278 switch (data[j]) { 279 switch (data[j]) {
279 case 0x16: /* multi controller (analog 4 axis) */ 280 case 0x16: /* multi controller (analog 4 axis) */
280 input_report_abs(dev, db9_abs[5], data[j + 6]); 281 input_report_abs(dev, db9_abs[5], data[j + 6]);
282 /* fall through */
281 case 0x15: /* mission stick (analog 3 axis) */ 283 case 0x15: /* mission stick (analog 3 axis) */
282 input_report_abs(dev, db9_abs[3], data[j + 4]); 284 input_report_abs(dev, db9_abs[3], data[j + 4]);
283 input_report_abs(dev, db9_abs[4], data[j + 5]); 285 input_report_abs(dev, db9_abs[4], data[j + 5]);
286 /* fall through */
284 case 0x13: /* racing controller (analog 1 axis) */ 287 case 0x13: /* racing controller (analog 1 axis) */
285 input_report_abs(dev, db9_abs[2], data[j + 3]); 288 input_report_abs(dev, db9_abs[2], data[j + 3]);
289 /* fall through */
286 case 0x34: /* saturn keyboard (udlr ZXC ASD QE Esc) */ 290 case 0x34: /* saturn keyboard (udlr ZXC ASD QE Esc) */
287 case 0x02: /* digital pad (digital 2 axis + buttons) */ 291 case 0x02: /* digital pad (digital 2 axis + buttons) */
288 input_report_abs(dev, db9_abs[0], !(data[j + 1] & 128) - !(data[j + 1] & 64)); 292 input_report_abs(dev, db9_abs[0], !(data[j + 1] & 128) - !(data[j + 1] & 64));
@@ -376,6 +380,7 @@ static void db9_timer(struct timer_list *t)
376 input_report_abs(dev2, ABS_X, (data & DB9_RIGHT ? 0 : 1) - (data & DB9_LEFT ? 0 : 1)); 380 input_report_abs(dev2, ABS_X, (data & DB9_RIGHT ? 0 : 1) - (data & DB9_LEFT ? 0 : 1));
377 input_report_abs(dev2, ABS_Y, (data & DB9_DOWN ? 0 : 1) - (data & DB9_UP ? 0 : 1)); 381 input_report_abs(dev2, ABS_Y, (data & DB9_DOWN ? 0 : 1) - (data & DB9_UP ? 0 : 1));
378 input_report_key(dev2, BTN_TRIGGER, ~data & DB9_FIRE1); 382 input_report_key(dev2, BTN_TRIGGER, ~data & DB9_FIRE1);
383 /* fall through */
379 384
380 case DB9_MULTI_0802: 385 case DB9_MULTI_0802:
381 386
diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c
index 32d94c63dc33..2835fba71c33 100644
--- a/drivers/input/keyboard/adp5589-keys.c
+++ b/drivers/input/keyboard/adp5589-keys.c
@@ -885,6 +885,7 @@ static int adp5589_probe(struct i2c_client *client,
885 switch (id->driver_data) { 885 switch (id->driver_data) {
886 case ADP5585_02: 886 case ADP5585_02:
887 kpad->support_row5 = true; 887 kpad->support_row5 = true;
888 /* fall through */
888 case ADP5585_01: 889 case ADP5585_01:
889 kpad->is_adp5585 = true; 890 kpad->is_adp5585 = true;
890 kpad->var = &const_adp5585; 891 kpad->var = &const_adp5585;
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index f593ec96c95f..f1e66e257cff 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -472,6 +472,7 @@ static int atp_status_check(struct urb *urb)
472 dev->info->datalen, dev->urb->actual_length); 472 dev->info->datalen, dev->urb->actual_length);
473 dev->overflow_warned = true; 473 dev->overflow_warned = true;
474 } 474 }
475 /* fall through */
475 case -ECONNRESET: 476 case -ECONNRESET:
476 case -ENOENT: 477 case -ENOENT:
477 case -ESHUTDOWN: 478 case -ESHUTDOWN:
diff --git a/drivers/input/mouse/cyapa_gen5.c b/drivers/input/mouse/cyapa_gen5.c
index 5775d40b3d53..14239fbd72cf 100644
--- a/drivers/input/mouse/cyapa_gen5.c
+++ b/drivers/input/mouse/cyapa_gen5.c
@@ -2554,6 +2554,7 @@ static int cyapa_gen5_do_operational_check(struct cyapa *cyapa)
2554 } 2554 }
2555 2555
2556 cyapa->state = CYAPA_STATE_GEN5_APP; 2556 cyapa->state = CYAPA_STATE_GEN5_APP;
2557 /* fall through */
2557 2558
2558 case CYAPA_STATE_GEN5_APP: 2559 case CYAPA_STATE_GEN5_APP:
2559 /* 2560 /*
diff --git a/drivers/input/mouse/cyapa_gen6.c b/drivers/input/mouse/cyapa_gen6.c
index 016397850b1b..c1b524ab4623 100644
--- a/drivers/input/mouse/cyapa_gen6.c
+++ b/drivers/input/mouse/cyapa_gen6.c
@@ -680,6 +680,7 @@ static int cyapa_gen6_operational_check(struct cyapa *cyapa)
680 } 680 }
681 681
682 cyapa->state = CYAPA_STATE_GEN6_APP; 682 cyapa->state = CYAPA_STATE_GEN6_APP;
683 /* fall through */
683 684
684 case CYAPA_STATE_GEN6_APP: 685 case CYAPA_STATE_GEN6_APP:
685 /* 686 /*
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index fb4d902c4403..d443067fc837 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -340,7 +340,7 @@ static void elantech_report_absolute_v2(struct psmouse *psmouse)
340 */ 340 */
341 if (packet[3] & 0x80) 341 if (packet[3] & 0x80)
342 fingers = 4; 342 fingers = 4;
343 /* pass through... */ 343 /* fall through */
344 case 1: 344 case 1:
345 /* 345 /*
346 * byte 1: . . . . x11 x10 x9 x8 346 * byte 1: . . . . x11 x10 x9 x8
diff --git a/drivers/input/mouse/sermouse.c b/drivers/input/mouse/sermouse.c
index d27816ac038f..3e8fb8136452 100644
--- a/drivers/input/mouse/sermouse.c
+++ b/drivers/input/mouse/sermouse.c
@@ -139,7 +139,8 @@ static void sermouse_process_ms(struct sermouse *sermouse, signed char data)
139 switch (sermouse->type) { 139 switch (sermouse->type) {
140 140
141 case SERIO_MS: 141 case SERIO_MS:
142 sermouse->type = SERIO_MP; 142 sermouse->type = SERIO_MP;
143 /* fall through */
143 144
144 case SERIO_MP: 145 case SERIO_MP:
145 if ((data >> 2) & 3) break; /* M++ Wireless Extension packet. */ 146 if ((data >> 2) & 3) break; /* M++ Wireless Extension packet. */
@@ -150,6 +151,7 @@ static void sermouse_process_ms(struct sermouse *sermouse, signed char data)
150 case SERIO_MZP: 151 case SERIO_MZP:
151 case SERIO_MZPP: 152 case SERIO_MZPP:
152 input_report_key(dev, BTN_SIDE, (data >> 5) & 1); 153 input_report_key(dev, BTN_SIDE, (data >> 5) & 1);
154 /* fall through */
153 155
154 case SERIO_MZ: 156 case SERIO_MZ:
155 input_report_key(dev, BTN_MIDDLE, (data >> 4) & 1); 157 input_report_key(dev, BTN_MIDDLE, (data >> 4) & 1);
diff --git a/drivers/input/touchscreen/elo.c b/drivers/input/touchscreen/elo.c
index 83433e8efff7..7f2942f3cec6 100644
--- a/drivers/input/touchscreen/elo.c
+++ b/drivers/input/touchscreen/elo.c
@@ -352,6 +352,7 @@ static int elo_connect(struct serio *serio, struct serio_driver *drv)
352 352
353 case 1: /* 6-byte protocol */ 353 case 1: /* 6-byte protocol */
354 input_set_abs_params(input_dev, ABS_PRESSURE, 0, 15, 0, 0); 354 input_set_abs_params(input_dev, ABS_PRESSURE, 0, 15, 0, 0);
355 /* fall through */
355 356
356 case 2: /* 4-byte protocol */ 357 case 2: /* 4-byte protocol */
357 input_set_abs_params(input_dev, ABS_X, 96, 4000, 0, 0); 358 input_set_abs_params(input_dev, ABS_X, 96, 4000, 0, 0);