From: Tudor.Ambarus@microchip.com Date: Fri, 9 Nov 2018 17:40:21 +0000 (+0000) Subject: mtd: spi-nor: mark desirable switch case fall through X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=f66734ae2d8d2b5e39f4ac3c5dc9666125bcb76e;p=openwrt%2Fstaging%2Fblogic.git mtd: spi-nor: mark desirable switch case fall through gcc 7 with -Wimplicit-fallthrough raises: drivers/mtd/spi-nor/spi-nor.c: In function ‘set_4byte’: drivers/mtd/spi-nor/spi-nor.c:289:13: warning: this statement may fall through [-Wimplicit-fallthrough=] need_wren = true; ~~~~~~~~~~^~~~~~ drivers/mtd/spi-nor/spi-nor.c:290:2: note: here case SNOR_MFR_MACRONIX: ^~~~ Quiet the warning by marking the expected switch fall through. Signed-off-by: Tudor Ambarus Signed-off-by: Boris Brezillon --- diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index afe12308bba6..5ca4aaf560da 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -287,6 +287,7 @@ static inline int set_4byte(struct spi_nor *nor, const struct flash_info *info, case SNOR_MFR_MICRON: /* Some Micron need WREN command; all will accept it */ need_wren = true; + /* fall through */ case SNOR_MFR_MACRONIX: case SNOR_MFR_WINBOND: if (need_wren)