Commit f7d6cf6d authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Boris Brezillon

mtd: cfi_cmdset_0020: Mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 114857 ("Missing break in switch")
Addresses-Coverity-ID: 114858 ("Missing break in switch")
Addresses-Coverity-ID: 114859 ("Missing break in switch")
Addresses-Coverity-ID: 114860 ("Missing break in switch")
Addresses-Coverity-ID: 114861 ("Missing break in switch")
Addresses-Coverity-ID: 114862 ("Missing break in switch")
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
parent 98473f5a
...@@ -324,6 +324,7 @@ static inline int do_read_onechip(struct map_info *map, struct flchip *chip, lof ...@@ -324,6 +324,7 @@ static inline int do_read_onechip(struct map_info *map, struct flchip *chip, lof
case FL_JEDEC_QUERY: case FL_JEDEC_QUERY:
map_write(map, CMD(0x70), cmd_addr); map_write(map, CMD(0x70), cmd_addr);
chip->state = FL_STATUS; chip->state = FL_STATUS;
/* Fall through */
case FL_STATUS: case FL_STATUS:
status = map_read(map, cmd_addr); status = map_read(map, cmd_addr);
...@@ -461,6 +462,7 @@ static int do_write_buffer(struct map_info *map, struct flchip *chip, ...@@ -461,6 +462,7 @@ static int do_write_buffer(struct map_info *map, struct flchip *chip,
#ifdef DEBUG_CFI_FEATURES #ifdef DEBUG_CFI_FEATURES
printk("%s: 1 status[%x]\n", __func__, map_read(map, cmd_adr)); printk("%s: 1 status[%x]\n", __func__, map_read(map, cmd_adr));
#endif #endif
/* Fall through */
case FL_STATUS: case FL_STATUS:
status = map_read(map, cmd_adr); status = map_read(map, cmd_adr);
...@@ -754,6 +756,7 @@ static inline int do_erase_oneblock(struct map_info *map, struct flchip *chip, u ...@@ -754,6 +756,7 @@ static inline int do_erase_oneblock(struct map_info *map, struct flchip *chip, u
case FL_READY: case FL_READY:
map_write(map, CMD(0x70), adr); map_write(map, CMD(0x70), adr);
chip->state = FL_STATUS; chip->state = FL_STATUS;
/* Fall through */
case FL_STATUS: case FL_STATUS:
status = map_read(map, adr); status = map_read(map, adr);
...@@ -995,6 +998,7 @@ static void cfi_staa_sync (struct mtd_info *mtd) ...@@ -995,6 +998,7 @@ static void cfi_staa_sync (struct mtd_info *mtd)
* as the whole point is that nobody can do anything * as the whole point is that nobody can do anything
* with the chip now anyway. * with the chip now anyway.
*/ */
/* Fall through */
case FL_SYNCING: case FL_SYNCING:
mutex_unlock(&chip->mutex); mutex_unlock(&chip->mutex);
break; break;
...@@ -1050,6 +1054,7 @@ static inline int do_lock_oneblock(struct map_info *map, struct flchip *chip, un ...@@ -1050,6 +1054,7 @@ static inline int do_lock_oneblock(struct map_info *map, struct flchip *chip, un
case FL_READY: case FL_READY:
map_write(map, CMD(0x70), adr); map_write(map, CMD(0x70), adr);
chip->state = FL_STATUS; chip->state = FL_STATUS;
/* Fall through */
case FL_STATUS: case FL_STATUS:
status = map_read(map, adr); status = map_read(map, adr);
...@@ -1196,6 +1201,7 @@ static inline int do_unlock_oneblock(struct map_info *map, struct flchip *chip, ...@@ -1196,6 +1201,7 @@ static inline int do_unlock_oneblock(struct map_info *map, struct flchip *chip,
case FL_READY: case FL_READY:
map_write(map, CMD(0x70), adr); map_write(map, CMD(0x70), adr);
chip->state = FL_STATUS; chip->state = FL_STATUS;
/* Fall through */
case FL_STATUS: case FL_STATUS:
status = map_read(map, adr); status = map_read(map, adr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment