[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] treewide: cleanup unreachable breaks
 
- To: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
 
- From: Jason Gunthorpe <jgg@xxxxxxxx>
 
- Date: Mon, 19 Oct 2020 20:05:46 -0300
 
- Cc: Tom Rix <trix@xxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>,	linux-edac@xxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx,	linux-pm@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx,	linux-block@xxxxxxxxxxxxxxx,	openipmi-developer@xxxxxxxxxxxxxxxxxxxxx,	"open list:HARDWARE RANDOM NUMBER GENERATOR CORE" <linux-crypto@xxxxxxxxxxxxxxx>,	Linux ARM <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>,	linux-power@xxxxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,	amd-gfx list <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>,	dri-devel <dri-devel@xxxxxxxxxxxxxxxxxxxxx>,	nouveau@xxxxxxxxxxxxxxxxxxxxx,	virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx,	spice-devel@xxxxxxxxxxxxxxxxxxxxx, linux-iio@xxxxxxxxxxxxxxx,	linux-amlogic@xxxxxxxxxxxxxxxxxxx,	industrypack-devel@xxxxxxxxxxxxxxxxxxxxx,	linux-media@xxxxxxxxxxxxxxx, MPT-FusionLinux.pdl@xxxxxxxxxxxx,	linux-scsi@xxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx,	linux-can@xxxxxxxxxxxxxxx,	Network Development <netdev@xxxxxxxxxxxxxxx>,	intel-wired-lan@xxxxxxxxxxxxxxxx, ath10k@xxxxxxxxxxxxxxxxxxx,	linux-wireless <linux-wireless@xxxxxxxxxxxxxxx>,	linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx, linux-nfc@xxxxxxxxxxxx,	linux-nvdimm <linux-nvdimm@xxxxxxxxxxxx>, linux-pci@xxxxxxxxxxxxxxx,	linux-samsung-soc@xxxxxxxxxxxxxxx,	platform-driver-x86@xxxxxxxxxxxxxxx, patches@xxxxxxxxxxxxxxxxxxxxx,	storagedev@xxxxxxxxxxxxx, devel@xxxxxxxxxxxxxxxxxxxx,	linux-serial@xxxxxxxxxxxxxxx, linux-usb@xxxxxxxxxxxxxxx,	usb-storage@xxxxxxxxxxxxxxxxxxxxxxxx,	linux-watchdog@xxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx,	bpf <bpf@xxxxxxxxxxxxxxx>, linux-integrity@xxxxxxxxxxxxxxx,	linux-security-module@xxxxxxxxxxxxxxx, keyrings@xxxxxxxxxxxxxxx,	alsa-devel@xxxxxxxxxxxxxxxx,	clang-built-linux <clang-built-linux@xxxxxxxxxxxxxxxx>,	Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>,	George Burgess <gbiv@xxxxxxxxxx>
 
- Delivery-date: Mon, 19 Oct 2020 23:06:00 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
On Mon, Oct 19, 2020 at 12:42:15PM -0700, Nick Desaulniers wrote:
> On Sat, Oct 17, 2020 at 10:43 PM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > On Sat, Oct 17, 2020 at 09:09:28AM -0700, trix@xxxxxxxxxx wrote:
> > > From: Tom Rix <trix@xxxxxxxxxx>
> > >
> > > This is a upcoming change to clean up a new warning treewide.
> > > I am wondering if the change could be one mega patch (see below) or
> > > normal patch per file about 100 patches or somewhere half way by 
> > > collecting
> > > early acks.
> >
> > Please break it up into one-patch-per-subsystem, like normal, and get it
> > merged that way.
> >
> > Sending us a patch, without even a diffstat to review, isn't going to
> > get you very far...
> 
> Tom,
> If you're able to automate this cleanup, I suggest checking in a
> script that can be run on a directory.  Then for each subsystem you
> can say in your commit "I ran scripts/fix_whatever.py on this subdir."
>  Then others can help you drive the tree wide cleanup.  Then we can
> enable -Wunreachable-code-break either by default, or W=2 right now
> might be a good idea.
I remember using clang-modernize in the past to fix issues very
similar to this, if clang machinery can generate the warning, can't
something like clang-tidy directly generate the patch?
You can send me a patch for drivers/infiniband/* as well
Thanks,
Jason
 
 
    
     |