Re: [PATCH] checkpatch: Allow --fix removal of unnecessary break statements

2020-10-19 Thread Joe Perches
On Mon, 2020-10-19 at 05:55 -0700, Tom Rix wrote: > On 10/18/20 1:19 PM, Joe Perches wrote: > > On Sun, 2020-10-18 at 13:07 -0700, Tom Rix wrote: > > > I like! > > [] > > > could add a '|break' here to catch the couple > > [] > > > break; > > > > > > break; > > Unfortunately, checkpatch is really

Re: [PATCH] checkpatch: Allow --fix removal of unnecessary break statements

2020-10-19 Thread Tom Rix
On 10/18/20 1:19 PM, Joe Perches wrote: > On Sun, 2020-10-18 at 13:07 -0700, Tom Rix wrote: >> I like! > [] >> could add a '|break' here to catch the couple > [] >> break; >> >> break; > Unfortunately, checkpatch is really stupid and it > wouldn't catch those > cases as there are blank lines > be

Re: [PATCH] checkpatch: Allow --fix removal of unnecessary break statements

2020-10-18 Thread Joe Perches
On Sun, 2020-10-18 at 13:07 -0700, Tom Rix wrote: > I like! [] > could add a '|break' here to catch the couple [] > break; > > break; Unfortunately, checkpatch is really stupid and it wouldn't catch those cases as there are blank lines between the existing consecutive break statements. It would

Re: [PATCH] checkpatch: Allow --fix removal of unnecessary break statements

2020-10-18 Thread Tom Rix
I like! On 10/18/20 12:49 PM, Joe Perches wrote: > switch/case use of break after a return or goto is unnecessary. > > There is an existing warning for these uses, so add a --fix option too. > > Signed-off-by: Joe Perches > --- > > For today's next, this would remove ~300 instances like: > >