Skip to contentSkip to conversation

mtd: mtdchar: Fix fall-through warnings for Clang

PATCH RESEND Applied Gustavo A. R. Silva 2 participants 2 messages Mar 5, 2021 – Mar 11, 2021 Memory technology devices (MTD)

v1 of 3 Applied Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 mtd: mtdchar: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.

---
 drivers/mtd/mtdchar.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mtd/mtdchar.c +1 -0
index 57c4a2f0b703..998d86f46488 100644
@@ -983,6 +983,7 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
 			if (!mtd_has_oob(mtd))
 				return -EOPNOTSUPP;
 			mfi->mode = arg;
+			break;
 
 		case MTD_FILE_MODE_NORMAL:
 			break;
Signature · 1 line
2.27.0