Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

virtio_net: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
by explicitly adding a goto statement instead of letting the code fall
through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/cb9b9534572bc476f4fb7b49a73dc8646b780c84.1605896060.git.gustavoars@kernel.org
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

authored by

Gustavo A. R. Silva and committed by
Michael S. Tsirkin
95efabf0 a6829c35

+1
+1
drivers/net/virtio_net.c
··· 732 732 fallthrough; 733 733 case XDP_ABORTED: 734 734 trace_xdp_exception(vi->dev, xdp_prog, act); 735 + goto err_xdp; 735 736 case XDP_DROP: 736 737 goto err_xdp; 737 738 }