From: Tom Rix <trix@redhat.com>
To: Joe Perches <joe@perches.com>, Andrew Morton <akpm@linux-foundation.org>
Cc: Julia Lawall <julia.lawall@inria.fr>,
linux-kernel@vger.kernel.org, cocci <cocci@systeme.lip6.fr>
Subject: Re: [PATCH] checkpatch: Allow --fix removal of unnecessary break statements
Date: Mon, 19 Oct 2020 05:55:30 -0700 [thread overview]
Message-ID: <c02aed9b-ab6c-1054-1e8a-4006f2a75f94@redhat.com> (raw)
In-Reply-To: <49c87dede8d06ba90ecb3200b2a773860d61a3c8.camel@perches.com>
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
> between the existing consecutive break
> statements.
>
> It would catch
>
> break;
> break;
>
> but there aren't any of those so it seems unlikely
> to be a very useful addition.
Unusual, but there are a couple of these.
Here's one from my rfc diff
diff --git a/sound/soc/codecs/wcd-clsh-v2.c b/sound/soc/codecs/wcd-clsh-v2.c
index 1be82113c59a..817d8259758c 100644
--- a/sound/soc/codecs/wcd-clsh-v2.c
+++ b/sound/soc/codecs/wcd-clsh-v2.c
@@ -478,11 +478,10 @@ static int _wcd_clsh_ctrl_set_state(struct wcd_clsh_ctrl *ctrl, int req_state,
wcd_clsh_state_hph_l(ctrl, req_state, is_enable, mode);
break;
case WCD_CLSH_STATE_HPHR:
wcd_clsh_state_hph_r(ctrl, req_state, is_enable, mode);
break;
- break;
case WCD_CLSH_STATE_LO:
wcd_clsh_state_lo(ctrl, req_state, is_enable, mode);
break;
default:
break;
Tom
>
next prev parent reply other threads:[~2020-10-19 12:55 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-17 16:09 [RFC] treewide: cleanup unreachable breaks trix
2020-10-17 16:24 ` Martin Blumenstingl
2020-10-17 16:24 ` Joe Perches
2020-10-17 18:21 ` [Cocci] " Julia Lawall
2020-10-17 19:00 ` Joe Perches
2020-10-18 19:49 ` [PATCH] checkpatch: Allow --fix removal of unnecessary break statements Joe Perches
2020-10-18 20:07 ` Tom Rix
2020-10-18 20:19 ` Joe Perches
2020-10-19 12:55 ` Tom Rix [this message]
2020-10-19 15:16 ` Joe Perches
2020-10-19 15:36 ` [PATCH V2] " Joe Perches
2020-10-17 21:01 ` [RFC] treewide: cleanup unreachable breaks Dan Williams
2020-10-18 5:43 ` Greg KH
2020-10-18 14:04 ` Tom Rix
2020-10-19 19:42 ` Nick Desaulniers
2020-10-19 23:05 ` Jason Gunthorpe
2020-10-20 14:09 ` Tom Rix
2020-10-20 8:47 ` [Ocfs2-devel] " John Haxby
2020-10-20 13:55 ` Tom Rix
2020-10-20 18:42 ` Joe Perches
2020-10-20 18:51 ` Nick Desaulniers
2020-10-20 18:54 ` Joe Perches
2020-10-18 9:29 ` Hans de Goede
2020-10-18 18:59 ` [Ocfs2-devel] " Matthew Wilcox
2020-10-18 19:06 ` Joe Perches
2020-10-18 19:13 ` James Bottomley
2020-10-18 19:16 ` Matthew Wilcox
2020-10-18 19:17 ` James Bottomley
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=c02aed9b-ab6c-1054-1e8a-4006f2a75f94@redhat.com \
--to=trix@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cocci@systeme.lip6.fr \
--cc=joe@perches.com \
--cc=julia.lawall@inria.fr \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®