]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
i40e: mark expected switch fall-through
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Wed, 1 May 2019 20:55:41 +0000 (15:55 -0500)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 14 Jun 2019 20:03:45 +0000 (13:03 -0700)
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:
  ^~~~

Signed-off-by: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_xsk.c

index 1b17486543ac7e078a8723512943bab1c50d6d46..557c565c26fc4249eca73e7d929984ffa9078da2 100644 (file)
@@ -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 */