提交 b633d440 编写于 作者: G Gustavo A. R. Silva 提交者: David S. Miller

virtio-net: mark expected switch fall-throughs

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: NGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1cbc36a5
...@@ -697,6 +697,7 @@ static struct sk_buff *receive_small(struct net_device *dev, ...@@ -697,6 +697,7 @@ static struct sk_buff *receive_small(struct net_device *dev,
goto xdp_xmit; goto xdp_xmit;
default: default:
bpf_warn_invalid_xdp_action(act); bpf_warn_invalid_xdp_action(act);
/* fall through */
case XDP_ABORTED: case XDP_ABORTED:
trace_xdp_exception(vi->dev, xdp_prog, act); trace_xdp_exception(vi->dev, xdp_prog, act);
case XDP_DROP: case XDP_DROP:
...@@ -876,8 +877,10 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, ...@@ -876,8 +877,10 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
goto xdp_xmit; goto xdp_xmit;
default: default:
bpf_warn_invalid_xdp_action(act); bpf_warn_invalid_xdp_action(act);
/* fall through */
case XDP_ABORTED: case XDP_ABORTED:
trace_xdp_exception(vi->dev, xdp_prog, act); trace_xdp_exception(vi->dev, xdp_prog, act);
/* fall through */
case XDP_DROP: case XDP_DROP:
if (unlikely(xdp_page != page)) if (unlikely(xdp_page != page))
__free_pages(xdp_page, 0); __free_pages(xdp_page, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册