[PATCH] mtd: spi-nor: add explicit fallthrough
Jules Maselbas
jmaselbas at zdiv.net
Tue Mar 25 08:55:39 PDT 2025
Add the fallthrough pseudo keyword: the case sets `need_wren = true;`
which is used (only read and never written) in the case below.
Signed-off-by: Jules Maselbas <jmaselbas at zdiv.net>
---
drivers/mtd/spi-nor/spi-nor.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index b9b2c7f6e5..6fcb8f38fa 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -316,6 +316,7 @@ static inline int set_4byte(struct spi_nor *nor, struct flash_info *info,
case CFI_MFR_ST: /* Micron, actually */
/* Some Micron need WREN command; all will accept it */
need_wren = true;
+ fallthrough;
case CFI_MFR_MACRONIX:
case 0xEF /* winbond */:
if (need_wren)
--
2.48.1
More information about the barebox
mailing list