Skip to contentSkip to conversation

davicom: Annotate implicit fall through in dm9000_set_io

PATCH Applied Mathieu Malaterre 2 participants 2 messages Jan 16, 2019 – Jan 17, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 davicom: Annotate implicit fall through in dm9000_set_io

There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warning (W=1).

This commit removes the following warning:

include/linux/device.h:1480:5: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/net/ethernet/davicom/dm9000.c:397:3: note: in expansion of macro 'dev_dbg' drivers/net/ethernet/davicom/dm9000.c:398:2: note: here

---
 drivers/net/ethernet/davicom/dm9000.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/davicom/dm9000.c +1 -0
index 0a82fcf16d35..c2586f44c29d 100644
@@ -395,6 +395,7 @@ static void dm9000_set_io(struct board_info *db, int byte_width)
 
 	case 3:
 		dev_dbg(db->dev, ": 3 byte IO, falling back to 16bit\n");
+		/* fall through */
 	case 2:
 		db->dumpblk = dm9000_dumpblk_16bit;
 		db->outblk  = dm9000_outblk_16bit;
Signature · 1 line
2.19.2
maintainer Applied
#1 lore raw

From: Mathieu Malaterre <[email protected]>
Date: Wed, 16 Jan 2019 20:49:25 +0100

Quoted 10 lines

There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warning (W=1).

This commit removes the following warning:

include/linux/device.h:1480:5: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/net/ethernet/davicom/dm9000.c:397:3: note: in expansion of macro 'dev_dbg' drivers/net/ethernet/davicom/dm9000.c:398:2: note: here

Applied.