Skip to contentSkip to conversation

net: plip: Fix fall-through warnings for Clang

PATCH RESEND Superseded Gustavo A. R. Silva 1 participant 1 message Mar 10, 2021

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 net: plip: Fix fall-through warnings for Clang

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

---
Changes in RESEND:
- None. Resending now that net-next is open.

 drivers/net/plip/plip.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/plip/plip.c +2 -0
index 4406b353123e..e26cf91bdec2 100644
@@ -516,6 +516,7 @@ plip_receive(unsigned short nibble_timeout, struct net_device *dev,
 		*data_p |= (c0 << 1) & 0xf0;
 		write_data (dev, 0x00); /* send ACK */
 		*ns_p = PLIP_NB_BEGIN;
+		break;
 	case PLIP_NB_2:
 		break;
 	}
@@ -808,6 +809,7 @@ plip_send_packet(struct net_device *dev, struct net_local *nl,
 				return HS_TIMEOUT;
 			}
 		}
+		break;
 
 	case PLIP_PK_LENGTH_LSB:
 		if (plip_send(nibble_timeout, dev,
Signature · 1 line
2.27.0