From 025a06c1104cd8995646b761d117816b5f28c873 Mon Sep 17 00:00:00 2001 From: Miquel Raynal Date: Wed, 25 Mar 2020 22:21:15 +0100 Subject: mtd: Convert fallthrough comments into statements Use Joe Perches cvt_fallthrough.pl script to convert /* fallthrough */ comments (and its derivatives) into a fallthrough; statement. This automatically drops useless ones. Do it MTD-wide. Signed-off-by: Miquel Raynal Acked-by: Vignesh Raghavendra Acked-by: Tudor Ambarus Acked-by: Richard Weinberger Link: https://lore.kernel.org/linux-mtd/20200325212115.14170-1-miquel.raynal@bootlin.com --- drivers/mtd/chips/cfi_cmdset_0020.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'drivers/mtd/chips/cfi_cmdset_0020.c') diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c index 54edae63b92d..270322bca221 100644 --- a/drivers/mtd/chips/cfi_cmdset_0020.c +++ b/drivers/mtd/chips/cfi_cmdset_0020.c @@ -324,8 +324,7 @@ static inline int do_read_onechip(struct map_info *map, struct flchip *chip, lof case FL_JEDEC_QUERY: map_write(map, CMD(0x70), cmd_addr); chip->state = FL_STATUS; - /* Fall through */ - + fallthrough; case FL_STATUS: status = map_read(map, cmd_addr); if (map_word_andequal(map, status, status_OK, status_OK)) { @@ -462,8 +461,7 @@ static int do_write_buffer(struct map_info *map, struct flchip *chip, #ifdef DEBUG_CFI_FEATURES printk("%s: 1 status[%x]\n", __func__, map_read(map, cmd_adr)); #endif - /* Fall through */ - + fallthrough; case FL_STATUS: status = map_read(map, cmd_adr); if (map_word_andequal(map, status, status_OK, status_OK)) @@ -756,8 +754,7 @@ retry: case FL_READY: map_write(map, CMD(0x70), adr); chip->state = FL_STATUS; - /* Fall through */ - + fallthrough; case FL_STATUS: status = map_read(map, adr); if (map_word_andequal(map, status, status_OK, status_OK)) @@ -998,7 +995,7 @@ static void cfi_staa_sync (struct mtd_info *mtd) * as the whole point is that nobody can do anything * with the chip now anyway. */ - /* Fall through */ + fallthrough; case FL_SYNCING: mutex_unlock(&chip->mutex); break; @@ -1054,8 +1051,7 @@ retry: case FL_READY: map_write(map, CMD(0x70), adr); chip->state = FL_STATUS; - /* Fall through */ - + fallthrough; case FL_STATUS: status = map_read(map, adr); if (map_word_andequal(map, status, status_OK, status_OK)) @@ -1201,8 +1197,7 @@ retry: case FL_READY: map_write(map, CMD(0x70), adr); chip->state = FL_STATUS; - /* Fall through */ - + fallthrough; case FL_STATUS: status = map_read(map, adr); if (map_word_andequal(map, status, status_OK, status_OK)) -- cgit v1.2.3