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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 19 Oct 2020 05:55:30 -0700
From:   Tom Rix <trix@...hat.com>
To:     Joe Perches <joe@...ches.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     Julia Lawall <julia.lawall@...ia.fr>, linux-kernel@...r.kernel.org,
        cocci <cocci@...teme.lip6.fr>
Subject: Re: [PATCH] checkpatch: Allow --fix removal of unnecessary break
 statements


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

>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ