Skip to content

treewide: Convert unscriptable /* fallthrough */ comments to fallthrough;

Joe Perches dri-devel lkml netdev netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drm: drm_vm: Use fallthrough;drivers/gpu/drm/drm_vm.c+2 -24 replies
2/3net: [IPv4/IPv6]: Use fallthrough;net/ipv4/af_inet.c net/ipv4/ah4.c net/ipv4/arp.c +23 more+41 -431 reply
3/3virt: vbox: Use fallthrough;drivers/virt/vboxguest/vboxguest_core.c drivers/virt/vboxguest/vboxguest_utils.c+2 -21 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchHans de GoedeDaniel Vetter
1/3A-b
2/3
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] treewide: Convert unscriptable /* fallthrough */ comments to fallthrough;

Several files in the kernel can not be perfectly scripted to convert /* fallthrough */ style comments to fallthrough; because the direct scripted conversion causes gcc to emit warnings because the fallthrough; marking is outside of an #ifdef/#endif block.

e.g.:

	switch (foo) {
	#ifdef CONFIG_BAR
	case BAR:
	     ...
	#endif
	/* fallthrough */
	case BAZ:
	     ...
	}

is converted via script to

	switch (foo) {
	#ifdef CONFIG_BAR
	case BAR:
	     ...
	#endif
	fallthrough;
	case BAZ:
	     ...
	}

gcc emits a warning for the bare fallthrough; before case BAZ: when CONFIG_BAR is not enabled.

So moving the fallthrough; conversions inside the #ifdef/#endif block avoids this warning.

These are the only warnings emitted on a treewide scripted conversion as found by the kernel-robot so applying these patches allows a treewide conversion, either as multiple discrete patches or a single large patch to eventually be done.

Joe Perches (3):
drm: drm_vm: Use fallthrough;
net: [IPv4/IPv6]: Use fallthrough;
virt: vbox: Use fallthrough;

 drivers/gpu/drm/drm_vm.c                 | 4 ++--
 drivers/virt/vboxguest/vboxguest_core.c  | 2 +-
 drivers/virt/vboxguest/vboxguest_utils.c | 2 +-
 net/ipv4/af_inet.c                       | 4 ++--
 net/ipv4/ah4.c                           | 2 +-
 net/ipv4/arp.c                           | 2 +-
 net/ipv4/devinet.c                       | 6 +++---
 net/ipv4/fib_semantics.c                 | 4 ++--
 net/ipv4/icmp.c                          | 2 +-
 net/ipv4/ip_output.c                     | 2 +-
 net/ipv4/ipmr.c                          | 2 +-
 net/ipv4/netfilter/nf_log_ipv4.c         | 2 +-
 net/ipv4/netfilter/nf_nat_pptp.c         | 4 ++--
 net/ipv4/nexthop.c                       | 2 +-
 net/ipv4/tcp.c                           | 2 +-
 net/ipv4/tcp_input.c                     | 6 +++---
 net/ipv4/tcp_ipv4.c                      | 4 ++--
 net/ipv4/udp.c                           | 2 +-
 net/ipv6/addrconf.c                      | 6 ++----
 net/ipv6/ah6.c                           | 2 +-
 net/ipv6/exthdrs.c                       | 2 +-
 net/ipv6/icmp.c                          | 2 +-
 net/ipv6/ip6_fib.c                       | 8 ++++----
 net/ipv6/ip6mr.c                         | 2 +-
 net/ipv6/ndisc.c                         | 2 +-
 net/ipv6/netfilter/nf_log_ipv6.c         | 2 +-
 net/ipv6/raw.c                           | 8 ++++----
 net/ipv6/route.c                         | 2 +-
 net/ipv6/tcp_ipv6.c                      | 2 +-
 29 files changed, 45 insertions(+), 47 deletions(-)
Signature · 6 lines
2.24.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel