From praghadeeshthevendria at gmail.com  Sat Jun 25 12:29:01 2022
From: praghadeeshthevendria at gmail.com (Praghadeesh T K S)
Date: Sat, 25 Jun 2022 19:29:01 +0000
Subject: [PATCH] net: wireless/broadcom: fix possible condition with no effect
Message-ID: <20220625192902.30050-1-praghadeeshthevendria@gmail.com>

Fix a coccinelle warning by removing condition with no possible effect

Signed-off-by: Praghadeesh T K S <praghadeeshthevendria at gmail.com>
---
 drivers/net/wireless/broadcom/b43/xmit.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/wireless/broadcom/b43/xmit.c b/drivers/net/wireless/broadcom/b43/xmit.c
index 7651b1b..667a74b 100644
--- a/drivers/net/wireless/broadcom/b43/xmit.c
+++ b/drivers/net/wireless/broadcom/b43/xmit.c
@@ -169,12 +169,7 @@ static u16 b43_generate_tx_phy_ctl1(struct b43_wldev *dev, u8 bitrate)
 	const struct b43_phy *phy = &dev->phy;
 	const struct b43_tx_legacy_rate_phy_ctl_entry *e;
 	u16 control = 0;
-	u16 bw;
-
-	if (phy->type == B43_PHYTYPE_LP)
-		bw = B43_TXH_PHY1_BW_20;
-	else /* FIXME */
-		bw = B43_TXH_PHY1_BW_20;
+	u16 bw = B43_TXH_PHY1_BW_20;
 
 	if (0) { /* FIXME: MIMO */
 	} else if (b43_is_cck_rate(bitrate) && phy->type != B43_PHYTYPE_LP) {
-- 
2.34.1



From s.gottschall at newmedia-net.de  Sun Jun 26 04:03:57 2022
From: s.gottschall at newmedia-net.de (Sebastian Gottschall)
Date: Sun, 26 Jun 2022 13:03:57 +0200
Subject: [PATCH] net: wireless/broadcom: fix possible condition with no
 effect
In-Reply-To: <20220625192902.30050-1-praghadeeshthevendria@gmail.com>
References: <20220625192902.30050-1-praghadeeshthevendria@gmail.com>
Message-ID: <458bd8dd-29c2-8029-20f5-f746db57740a@newmedia-net.de>

Am 25.06.2022 um 21:29 schrieb Praghadeesh T K S:
> Fix a coccinelle warning by removing condition with no possible effect
>
> Signed-off-by: Praghadeesh T K S <praghadeeshthevendria at gmail.com>
> ---
>   drivers/net/wireless/broadcom/b43/xmit.c | 7 +------
>   1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/net/wireless/broadcom/b43/xmit.c b/drivers/net/wireless/broadcom/b43/xmit.c
> index 7651b1b..667a74b 100644
> --- a/drivers/net/wireless/broadcom/b43/xmit.c
> +++ b/drivers/net/wireless/broadcom/b43/xmit.c
> @@ -169,12 +169,7 @@ static u16 b43_generate_tx_phy_ctl1(struct b43_wldev *dev, u8 bitrate)
>   	const struct b43_phy *phy = &dev->phy;
>   	const struct b43_tx_legacy_rate_phy_ctl_entry *e;
>   	u16 control = 0;
> -	u16 bw;
> -
> -	if (phy->type == B43_PHYTYPE_LP)
> -		bw = B43_TXH_PHY1_BW_20;
> -	else /* FIXME */
> -		bw = B43_TXH_PHY1_BW_20;
> +	u16 bw = B43_TXH_PHY1_BW_20;
Can you check if this is a possible register typo?
>   
>   	if (0) { /* FIXME: MIMO */
>   	} else if (b43_is_cck_rate(bitrate) && phy->type != B43_PHYTYPE_LP) {


From andrew at lunn.ch  Sun Jun 26 04:12:29 2022
From: andrew at lunn.ch (Andrew Lunn)
Date: Sun, 26 Jun 2022 13:12:29 +0200
Subject: [PATCH] net: wireless/broadcom: fix possible condition with no
 effect
In-Reply-To: <458bd8dd-29c2-8029-20f5-f746db57740a@newmedia-net.de>
References: <20220625192902.30050-1-praghadeeshthevendria@gmail.com>
 <458bd8dd-29c2-8029-20f5-f746db57740a@newmedia-net.de>
Message-ID: <Yrg/HTOnVF53WRVV@lunn.ch>

On Sun, Jun 26, 2022 at 01:03:57PM +0200, Sebastian Gottschall wrote:
> Am 25.06.2022 um 21:29 schrieb Praghadeesh T K S:
> > Fix a coccinelle warning by removing condition with no possible effect
> > 
> > Signed-off-by: Praghadeesh T K S <praghadeeshthevendria at gmail.com>
> > ---
> >   drivers/net/wireless/broadcom/b43/xmit.c | 7 +------
> >   1 file changed, 1 insertion(+), 6 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/broadcom/b43/xmit.c b/drivers/net/wireless/broadcom/b43/xmit.c
> > index 7651b1b..667a74b 100644
> > --- a/drivers/net/wireless/broadcom/b43/xmit.c
> > +++ b/drivers/net/wireless/broadcom/b43/xmit.c
> > @@ -169,12 +169,7 @@ static u16 b43_generate_tx_phy_ctl1(struct b43_wldev *dev, u8 bitrate)
> >   	const struct b43_phy *phy = &dev->phy;
> >   	const struct b43_tx_legacy_rate_phy_ctl_entry *e;
> >   	u16 control = 0;
> > -	u16 bw;
> > -
> > -	if (phy->type == B43_PHYTYPE_LP)
> > -		bw = B43_TXH_PHY1_BW_20;
> > -	else /* FIXME */
> > -		bw = B43_TXH_PHY1_BW_20;
> > +	u16 bw = B43_TXH_PHY1_BW_20;

Hi Praghadeesh

I assume you took a deep look at the FIXME, understand why it is
there, looked at the datasheet etc, and decided it is not in fact
broken. Hence it is safe to remove the FIXME. Please could you
summarise your findings in the commit messages.

	  Andrew


From m at bues.ch  Sun Jun 26 04:18:37 2022
From: m at bues.ch (Michael =?UTF-8?B?QsO8c2No?=)
Date: Sun, 26 Jun 2022 13:18:37 +0200
Subject: [PATCH] net: wireless/broadcom: fix possible condition with no
 effect
In-Reply-To: <458bd8dd-29c2-8029-20f5-f746db57740a@newmedia-net.de>
References: <20220625192902.30050-1-praghadeeshthevendria@gmail.com>
 <458bd8dd-29c2-8029-20f5-f746db57740a@newmedia-net.de>
Message-ID: <20220626131837.622a36c5@barney>

On Sun, 26 Jun 2022 13:03:57 +0200
Sebastian Gottschall <s.gottschall at newmedia-net.de> wrote:

> Am 25.06.2022 um 21:29 schrieb Praghadeesh T K S:
> > Fix a coccinelle warning by removing condition with no possible
> > effect
> >
> > Signed-off-by: Praghadeesh T K S <praghadeeshthevendria at gmail.com>
> > ---
> >   drivers/net/wireless/broadcom/b43/xmit.c | 7 +------
> >   1 file changed, 1 insertion(+), 6 deletions(-)
> >
> > diff --git a/drivers/net/wireless/broadcom/b43/xmit.c
> > b/drivers/net/wireless/broadcom/b43/xmit.c index 7651b1b..667a74b
> > 100644 --- a/drivers/net/wireless/broadcom/b43/xmit.c
> > +++ b/drivers/net/wireless/broadcom/b43/xmit.c
> > @@ -169,12 +169,7 @@ static u16 b43_generate_tx_phy_ctl1(struct
> > b43_wldev *dev, u8 bitrate) const struct b43_phy *phy = &dev->phy;
> >   	const struct b43_tx_legacy_rate_phy_ctl_entry *e;
> >   	u16 control = 0;
> > -	u16 bw;
> > -
> > -	if (phy->type == B43_PHYTYPE_LP)
> > -		bw = B43_TXH_PHY1_BW_20;
> > -	else /* FIXME */
> > -		bw = B43_TXH_PHY1_BW_20;
> > +	u16 bw = B43_TXH_PHY1_BW_20;  
> Can you check if this is a possible register typo?


I think use of this name was intentional.
The code is marked as being incomplete with /* FIXME */

This change removes the FIXME. Which is bad. It doesn't improve the
code. It reduces code quality by removing the
incompleteness documentation.

Please leave the code as-is.

-- 
Michael B?sch
https://bues.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20220626/1a96b2e2/attachment.sig>

