Skip to content

Commit

Permalink
eeprom: at25: 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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Gustavo A. R. Silva authored and Greg Kroah-Hartman committed Jul 7, 2018
1 parent 97b715b commit 0c2ccd8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/misc/eeprom/at25.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ static int at25_ee_read(void *priv, unsigned int offset,
switch (at25->addrlen) {
default: /* case 3 */
*cp++ = offset >> 16;
/* fall through */
case 2:
*cp++ = offset >> 8;
/* fall through */
case 1:
case 0: /* can't happen: for better codegen */
*cp++ = offset >> 0;
Expand Down Expand Up @@ -180,8 +182,10 @@ static int at25_ee_write(void *priv, unsigned int off, void *val, size_t count)
switch (at25->addrlen) {
default: /* case 3 */
*cp++ = offset >> 16;
/* fall through */
case 2:
*cp++ = offset >> 8;
/* fall through */
case 1:
case 0: /* can't happen: for better codegen */
*cp++ = offset >> 0;
Expand Down

0 comments on commit 0c2ccd8

Please sign in to comment.