Skip to content

Commit

Permalink
Input: xen-kbdfront - mark expected switch fall-through
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.

Notice that in this particular case, I placed the "fall through"
part at the beginning of the code comment, which is what GCC is
expecting to find.

Addresses-Coverity-ID: 114757 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Gustavo A. R. Silva authored and Dmitry Torokhov committed Oct 17, 2018
1 parent 03bf678 commit 9023705
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/misc/xen-kbdfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,
case XenbusStateClosed:
if (dev->state == XenbusStateClosed)
break;
/* Missed the backend's CLOSING state -- fallthrough */
/* fall through - Missed the backend's CLOSING state */
case XenbusStateClosing:
xenbus_frontend_closed(dev);
break;
Expand Down

0 comments on commit 9023705

Please sign in to comment.