* [PATCH RESEND][next] net: plip: Fix fall-through warnings for Clang
@ 2021-03-10 5:45 Gustavo A. R. Silva
0 siblings, 0 replies; only message in thread
From: Gustavo A. R. Silva @ 2021-03-10 5:45 UTC (permalink / raw)
To: David S. Miller, Jakub Kicinski
Cc: netdev, linux-kernel, Gustavo A. R. Silva, linux-hardening
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.
Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
Changes in RESEND:
- None. Resending now that net-next is open.
drivers/net/plip/plip.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c
index 4406b353123e..e26cf91bdec2 100644
--- a/drivers/net/plip/plip.c
+++ b/drivers/net/plip/plip.c
@@ -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,
--
2.27.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-10 5:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 5:45 [PATCH RESEND][next] net: plip: Fix fall-through warnings for Clang Gustavo A. R. Silva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).