Skip to contentSkip to conversation

i40e: mark expected switch fall-through

PATCH Superseded Gustavo A. R. Silva 2 participants 3 messages Aug 30, 2018 – Aug 31, 2018

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i40e: mark expected switch fall-through

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

Addresses-Coverity-ID: 1473099 ("Missing break in switch")

---
 drivers/net/ethernet/intel/i40e/i40e_xsk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/i40e/i40e_xsk.c +2 -1
index 94947a8..a6f50f6 100644
@@ -300,9 +300,10 @@ static int i40e_run_xdp_zc(struct i40e_ring *rx_ring, struct xdp_buff *xdp)
 		break;
 	default:
 		bpf_warn_invalid_xdp_action(act);
+		/* fall through */
 	case XDP_ABORTED:
 		trace_xdp_exception(rx_ring->netdev, xdp_prog, act);
-		/* fallthrough -- handle aborts by dropping packet */
+		/* fall through -- handle aborts by dropping packet */
 	case XDP_DROP:
 		result = I40E_XDP_CONSUMED;
 		break;
Signature · 1 line
2.7.4
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: Gustavo A. R. Silva [mailto:gustavo at embeddedor.com]
Sent: Thursday, August 30, 2018 11:50
To: Kirsher, Jeffrey T <[email protected]>; David S. Miller <[email protected]>
Cc: intel-wired-lan at lists.osuosl.org; netdev at vger.kernel.org; linux- kernel at vger.kernel.org; Gustavo A. R. Silva <[email protected]>
Subject: [PATCH] i40e: mark expected switch fall-through

Quoted 8 lines

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

Addresses-Coverity-ID: 1473099 ("Missing break in switch")

---
 drivers/net/ethernet/intel/i40e/i40e_xsk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

I have picked this up Dave.

#2 lore raw
Quoted 12 lines · Jeffrey T
Quoted 12 lines

-----Original Message-----
From: Gustavo A. R. Silva [mailto:[email protected]]
Sent: Thursday, August 30, 2018 11:50
To: Kirsher, Jeffrey T <[email protected]>; David S. Miller <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]; Gustavo A. R. Silva <[email protected]>
Subject: [PATCH] i40e: mark expected switch fall-through

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

Quoted 8 lines
Quoted 5 lines

Addresses-Coverity-ID: 1473099 ("Missing break in switch")

---
 drivers/net/ethernet/intel/i40e/i40e_xsk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

I have picked this up Dave.

Thanks, Jeffrey.
--
Gustavo