Skip to content

Commit

Permalink
Input: gamecon - mark expected switch fall-throughs
Browse files Browse the repository at this point in the history
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 114761
Addresses-Coverity-ID: 114762
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Gustavo A. R. Silva authored and Dmitry Torokhov committed Nov 10, 2017
1 parent 56c78bb commit c1b433e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/input/joystick/gamecon.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ static void gc_psx_report_one(struct gc_pad *pad, unsigned char psx_type,

input_report_key(dev, BTN_THUMBL, ~data[0] & 0x04);
input_report_key(dev, BTN_THUMBR, ~data[0] & 0x02);
/* fall through */

case GC_PSX_NEGCON:
case GC_PSX_ANALOG:
Expand Down Expand Up @@ -887,13 +888,15 @@ static int gc_setup_pad(struct gc *gc, int idx, int pad_type)
case GC_SNES:
for (i = 4; i < 8; i++)
__set_bit(gc_snes_btn[i], input_dev->keybit);
/* fall through */
case GC_NES:
for (i = 0; i < 4; i++)
__set_bit(gc_snes_btn[i], input_dev->keybit);
break;

case GC_MULTI2:
__set_bit(BTN_THUMB, input_dev->keybit);
/* fall through */
case GC_MULTI:
__set_bit(BTN_TRIGGER, input_dev->keybit);
break;
Expand Down

0 comments on commit c1b433e

Please sign in to comment.