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:   Tue, 10 Oct 2017 15:35:10 -0400
From:   Jes Sorensen <jes.sorensen@...il.com>
To:     "Gustavo A. R. Silva" <garsilva@...eddedor.com>,
        Kalle Valo <kvalo@...eaurora.org>
Cc:     linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rtl8xxxu: mark expected switch fall-throughs

On 10/10/2017 03:30 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.

While this isn't harmful, to me this looks like pointless patch churn 
for zero gain and it's just ugly.

Jes


> Cc: Jes Sorensen <Jes.Sorensen@...il.com>
> Cc: Kalle Valo <kvalo@...eaurora.org>
> Cc: linux-wireless@...r.kernel.org
> Cc: netdev@...r.kernel.org
> Signed-off-by: Gustavo A. R. Silva <garsilva@...eddedor.com>
> ---
>   drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> index 7806a4d..e66be05 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> @@ -1153,6 +1153,7 @@ void rtl8xxxu_gen1_config_channel(struct ieee80211_hw *hw)
>   	switch (hw->conf.chandef.width) {
>   	case NL80211_CHAN_WIDTH_20_NOHT:
>   		ht = false;
> +		/* fall through */
>   	case NL80211_CHAN_WIDTH_20:
>   		opmode |= BW_OPMODE_20MHZ;
>   		rtl8xxxu_write8(priv, REG_BW_OPMODE, opmode);
> @@ -1280,6 +1281,7 @@ void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw)
>   	switch (hw->conf.chandef.width) {
>   	case NL80211_CHAN_WIDTH_20_NOHT:
>   		ht = false;
> +		/* fall through */
>   	case NL80211_CHAN_WIDTH_20:
>   		rf_mode_bw |= WMAC_TRXPTCL_CTL_BW_20;
>   		subchannel = 0;
> @@ -1748,9 +1750,11 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv *priv)
>   		case 3:
>   			priv->ep_tx_low_queue = 1;
>   			priv->ep_tx_count++;
> +			/* fall through */
>   		case 2:
>   			priv->ep_tx_normal_queue = 1;
>   			priv->ep_tx_count++;
> +			/* fall through */
>   		case 1:
>   			priv->ep_tx_high_queue = 1;
>   			priv->ep_tx_count++;
> @@ -5691,6 +5695,7 @@ static int rtl8xxxu_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
>   		break;
>   	case WLAN_CIPHER_SUITE_TKIP:
>   		key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
> +		/* fall through */
>   	default:
>   		return -EOPNOTSUPP;
>   	}
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ