linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: dri-devel@lists.freedesktop.org, netdev@vger.kernel.org,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] treewide: Convert unscriptable /* fallthrough */ comments to fallthrough;
Date: Thu, 12 Mar 2020 12:17:11 -0700	[thread overview]
Message-ID: <cover.1584040050.git.joe@perches.com> (raw)

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(-)

-- 
2.24.0


             reply	other threads:[~2020-03-12 19:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 19:17 Joe Perches [this message]
2020-03-12 19:17 ` [PATCH 1/3] drm: drm_vm: Use fallthrough; Joe Perches
2020-03-17 16:48   ` Daniel Vetter
2020-03-17 22:13     ` Joe Perches
2020-03-18 13:49       ` Daniel Vetter
2020-03-18 16:43         ` Joe Perches
2020-03-12 19:17 ` [PATCH 2/3] net: [IPv4/IPv6]: " Joe Perches
2020-03-12 22:44   ` David Miller
2020-03-12 19:17 ` [PATCH 3/3] virt: vbox: " Joe Perches
2020-03-13 10:45   ` Hans de Goede
2020-03-12 22:50 ` [PATCH 2/3 V2] inet: " Joe Perches
2020-03-12 22:56   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1584040050.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=coreteam@netfilter.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).