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] [day] [month] [year] [list]
Message-ID: <715ddf72-978c-a525-0625-ea740a104f2a@embeddedor.com>
Date:   Mon, 19 Oct 2020 11:38:25 -0500
From:   "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To:     Joe Perches <joe@...ches.com>,
        Christian Lamparter <chunkeey@...il.com>, trix@...hat.com,
        kvalo@...eaurora.org, davem@...emloft.net, kuba@...nel.org,
        mcoquelin.stm32@...il.com, alexandre.torgue@...com,
        ath9k-devel@....qualcomm.com, johannes.berg@...el.com,
        emmanuel.grumbach@...el.com, luciano.coelho@...el.com,
        linuxwifi@...el.com, chunkeey@...glemail.com, pkshih@...ltek.com,
        sara.sharon@...el.com, tova.mussai@...el.com,
        nathan.errera@...el.com, lior2.cohen@...el.com, john@...ozen.org,
        shaul.triebitz@...el.com, shahar.s.matityahu@...el.com,
        Larry.Finger@...inger.net, zhengbin13@...wei.com,
        christophe.jaillet@...adoo.fr, yanaijie@...wei.com,
        saurav.girepunje@...il.com
Cc:     ath10k@...ts.infradead.org, linux-wireless@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] wireless: remove unneeded break



On 10/19/20 11:20, Joe Perches wrote:
> On Mon, 2020-10-19 at 10:54 -0500, Gustavo A. R. Silva wrote:
>> On 10/19/20 10:21, Joe Perches wrote:
>>> On Mon, 2020-10-19 at 17:14 +0200, Christian Lamparter wrote:
>>>> On 19/10/2020 17:05, trix@...hat.com wrote:
>>>>> From: Tom Rix <trix@...hat.com>
>>>>>
>>>>> A break is not needed if it is preceded by a return or goto
>>>>>
>>>>> Signed-off-by: Tom Rix <trix@...hat.com>
>>>>> diff --git a/drivers/net/wireless/intersil/p54/eeprom.c b/drivers/net/wireless/intersil/p54/eeprom.c
> []
>>>>> @@ -870,7 +870,6 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
>>>>>   			} else {
>>>>>   				goto good_eeprom;
>>>>>   			}
>>>>> -			break;
>>>> Won't the compiler (gcc) now complain about a missing fallthrough annotation?
>>
>> Clang would definitely complain about this.
> 
> As far as I can tell, clang 10.0.0 doesn't complain.

Oh, yeah. I didn't see the other "goto err;" in the if clause above. Clang doesn't
complain because there is actually no chance of any implicit fall-through.

--
Gustavo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ