virtio-net: mark expected switch fall-throughs
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Sun, 5 Aug 2018 02:42:05 +0000 (21:42 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Aug 2018 00:26:43 +0000 (17:26 -0700)
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 1402059 ("Missing break in switch")
Addresses-Coverity-ID: 1402060 ("Missing break in switch")
Addresses-Coverity-ID: 1402061 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c

index 14f661cbae185436deb8ae573ca27d8f6d0d2d76..62311dde6e71d48cd929961c14a926dab5592cd1 100644 (file)
@@ -697,6 +697,7 @@ static struct sk_buff *receive_small(struct net_device *dev,
                        goto xdp_xmit;
                default:
                        bpf_warn_invalid_xdp_action(act);
+                       /* fall through */
                case XDP_ABORTED:
                        trace_xdp_exception(vi->dev, xdp_prog, act);
                case XDP_DROP:
@@ -876,8 +877,10 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
                        goto xdp_xmit;
                default:
                        bpf_warn_invalid_xdp_action(act);
+                       /* fall through */
                case XDP_ABORTED:
                        trace_xdp_exception(vi->dev, xdp_prog, act);
+                       /* fall through */
                case XDP_DROP:
                        if (unlikely(xdp_page != page))
                                __free_pages(xdp_page, 0);