* [PATCH][next] i40e: mark expected switch fall-through
@ 2019-05-01 20:55 Gustavo A. R. Silva
2019-05-17 22:36 ` [Intel-wired-lan] " Bowers, AndrewX
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2019-05-01 20:55 UTC (permalink / raw)
To: Jeff Kirsher, David S. Miller
Cc: intel-wired-lan, netdev, linux-kernel, Gustavo A. R. Silva, Kees Cook
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
This patch fixes the following warning:
drivers/net/ethernet/intel/i40e/i40e_xsk.c: In function ‘i40e_run_xdp_zc’:
drivers/net/ethernet/intel/i40e/i40e_xsk.c:217:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
bpf_warn_invalid_xdp_action(act);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/i40e/i40e_xsk.c:218:2: note: here
case XDP_ABORTED:
^~~~
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
This patch fixes the following warning:
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/intel/i40e/i40e_xsk.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
index 1b17486543ac..557c565c26fc 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
@@ -215,6 +215,7 @@ 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 */
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [Intel-wired-lan] [PATCH][next] i40e: mark expected switch fall-through
2019-05-01 20:55 [PATCH][next] i40e: mark expected switch fall-through Gustavo A. R. Silva
@ 2019-05-17 22:36 ` Bowers, AndrewX
0 siblings, 0 replies; 2+ messages in thread
From: Bowers, AndrewX @ 2019-05-17 22:36 UTC (permalink / raw)
To: netdev, intel-wired-lan, linux-kernel
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On
> Behalf Of Gustavo A. R. Silva
> Sent: Wednesday, May 1, 2019 1:56 PM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>; David S. Miller
> <davem@davemloft.net>
> Cc: netdev@vger.kernel.org; intel-wired-lan@lists.osuosl.org; linux-
> kernel@vger.kernel.org; Kees Cook <keescook@chromium.org>
> Subject: [Intel-wired-lan] [PATCH][next] i40e: mark expected switch fall-
> through
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
> we are expecting to fall through.
>
> This patch fixes the following warning:
>
> drivers/net/ethernet/intel/i40e/i40e_xsk.c: In function ‘i40e_run_xdp_zc’:
> drivers/net/ethernet/intel/i40e/i40e_xsk.c:217:3: warning: this statement
> may fall through [-Wimplicit-fallthrough=]
> bpf_warn_invalid_xdp_action(act);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/ethernet/intel/i40e/i40e_xsk.c:218:2: note: here
> case XDP_ABORTED:
> ^~~~
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
> we are expecting to fall through.
>
> This patch fixes the following warning:
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_xsk.c | 1 +
> 1 file changed, 1 insertion(+)
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-17 22:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-01 20:55 [PATCH][next] i40e: mark expected switch fall-through Gustavo A. R. Silva
2019-05-17 22:36 ` [Intel-wired-lan] " Bowers, AndrewX
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).