lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 17 Sep 2020 10:03:35 +0200 From: Simon Horman <simon.horman@...ronome.com> To: Joe Perches <joe@...ches.com> Cc: LKML <linux-kernel@...r.kernel.org>, Jiri Kosina <trivial@...nel.org>, Kees Cook <kees.cook@...onical.com>, Nick Desaulniers <ndesaulniers@...gle.com>, linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu, linux-mips@...r.kernel.org, linux-s390@...r.kernel.org, linux-crypto@...r.kernel.org, linux-ide@...r.kernel.org, linux-atm-general@...ts.sourceforge.net, netdev@...r.kernel.org, intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org, linux-input@...r.kernel.org, linux-i2c@...r.kernel.org, linux-rdma@...r.kernel.org, iommu@...ts.linux-foundation.org, dm-devel@...hat.com, linux-media@...r.kernel.org, linux-mmc@...r.kernel.org, linux-mtd@...ts.infradead.org, intel-wired-lan@...ts.osuosl.org, oss-drivers@...ronome.com, linux-usb@...r.kernel.org, linux-wireless@...r.kernel.org, linux-mediatek@...ts.infradead.org, linux-nvme@...ts.infradead.org, linux-pm@...r.kernel.org, linux-rtc@...r.kernel.org, linux-scsi@...r.kernel.org, storagedev@...rochip.com, sparclinux@...r.kernel.org, linux-serial@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org, linux-parisc@...r.kernel.org, linux-fbdev@...r.kernel.org, linux-afs@...ts.infradead.org, ceph-devel@...r.kernel.org, linux-nfs@...r.kernel.org, bpf@...r.kernel.org, dccp@...r.kernel.org, netfilter-devel@...r.kernel.org, coreteam@...filter.org, linux-sctp@...r.kernel.org, alsa-devel <alsa-devel@...a-project.org> Subject: Re: [oss-drivers] [trivial PATCH] treewide: Convert switch/case fallthrough; to break; On Wed, Sep 09, 2020 at 01:06:39PM -0700, Joe Perches wrote: > fallthrough to a separate case/default label break; isn't very readable. > > Convert pseudo-keyword fallthrough; statements to a simple break; when > the next label is case or default and the only statement in the next > label block is break; > > Found using: > > $ grep-2.5.4 -rP --include=*.[ch] -n "fallthrough;(\s*(case\s+\w+|default)\s*:\s*){1,7}break;" * > > Miscellanea: > > o Move or coalesce a couple label blocks above a default: block. > > Signed-off-by: Joe Perches <joe@...ches.com> ... > diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c > index 252fe06f58aa..1d5b87079104 100644 > --- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c > +++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c > @@ -345,7 +345,7 @@ static int matching_bar(struct nfp_bar *bar, u32 tgt, u32 act, u32 tok, > baract = NFP_CPP_ACTION_RW; > if (act == 0) > act = NFP_CPP_ACTION_RW; > - fallthrough; > + break; > case NFP_PCIE_BAR_PCIE2CPP_MapType_FIXED: > break; > default: This is a cascading fall-through handling all map types. I don't think this change improves readability. ...
Powered by blists - more mailing lists