From: Andre Przywara Date: Thu, 27 Mar 2025 15:33:09 +0000 (+0000) Subject: mtd: spi-nor-tiny: annotate switch/case fallthrough X-Git-Tag: v2025.07-rc1~108^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=452dfcc3b461c1bfbc2126623f42f551000a9ca3;p=pandora-u-boot.git mtd: spi-nor-tiny: annotate switch/case fallthrough The SPI NOR code uses an implicit switch/case fallthrough when checking different vendors to determine how to deal with extended addressig modes. Add our "fallthrough;" statement-like macro before some label in the 4-byte addressing mode code, to avoid a warning when GCC's -Wimplicit-fallthrough warning option is enabled. Signed-off-by: Andre Przywara Reviewed-by: Tom Rini --- diff --git a/drivers/mtd/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c index 5755c5eed29..23de64a1520 100644 --- a/drivers/mtd/spi/spi-nor-tiny.c +++ b/drivers/mtd/spi/spi-nor-tiny.c @@ -219,6 +219,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; + fallthrough; case SNOR_MFR_MACRONIX: case SNOR_MFR_WINBOND: if (need_wren)