net: wireless/broadcom: fix possible condition with no effect
Subsystems (3)
PATCH 1/1 net: wireless/broadcom: fix possible condition with no effect
Fix a coccinelle warning by removing condition with no possible effect
--- drivers/net/wireless/broadcom/b43/xmit.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/net/wireless/broadcom/b43/xmit.c +1 -6
@@ -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 ) {
Signature · 1 line
2.34.1
Am 25.06.2022 um 21:29 schrieb Praghadeesh T K S:
Quoted 12 lines
Fix a coccinelle warning by removing condition with no possible effect
Signed-off-by Praghadeesh T K S <[email protected]>--- drivers/net/wireless/broadcom/b43/xmit.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)drivers/net/wireless/broadcom/b43/xmit.c +0
-0
drivers/net/wireless/broadcom/b43/xmit.c static u16 b43_generate_tx_phy_ctl1(struct b43_wldev *dev, u8 bitrate) · line 172
Quoted 10 lines
drivers/net/wireless/broadcom/b43/xmit.c +1
-6@@ -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?
Quoted 3 lines
drivers/net/wireless/broadcom/b43/xmit.c +0
-0if (0 ) {/* FIXME: MIMO */ }else if (b43_is_cck_rate (bitrate) && phy->type !=B43_PHYTYPE_LP ) {
Quoted 8 lines · Sebastian Gottschall
Am 25.06.2022 um 21:29 schrieb Praghadeesh T K S:
Quoted 7 lines
Fix a coccinelle warning by removing condition with no possible effect
Signed-off-by Praghadeesh T K S <[email protected]>--- drivers/net/wireless/broadcom/b43/xmit.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
Quoted 15 lines
Quoted 5 lines
drivers/net/wireless/broadcom/b43/xmit.c +0
-0drivers/net/wireless/broadcom/b43/xmit.c static u16 b43_generate_tx_phy_ctl1(struct b43_wldev *dev, u8 bitrate) · line 172
Quoted 10 lines
drivers/net/wireless/broadcom/b43/xmit.c +1
-6@@ -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
Quoted 9 lines · On Sun, 26 Jun 2022 13:03:57 +0200 Sebastian Gottschall…
Am 25.06.2022 um 21:29 schrieb Praghadeesh T K S:
Quoted 8 lines
Fix a coccinelle warning by removing condition with no possible effect
Signed-off-by Praghadeesh T K S <[email protected]>--- drivers/net/wireless/broadcom/b43/xmit.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
Quoted 16 lines
Quoted 5 lines
(quoted diff) +0
-0
b/drivers/net/wireless/broadcom/b43/xmit.cindex 7651b1b..667a74b 100644 ---a/drivers/net/wireless/broadcom/b43/xmit.c+++b/drivers/net/wireless/broadcom/b43/xmit.cdrivers/net/wireless/broadcom/b43/xmit.c static u16 b43_generate_tx_phy_ctl1(struct · line 172
Quoted 10 lines
drivers/net/wireless/broadcom/b43/xmit.c +1
-6@@ -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.
Signature · 2 lines
Michael Büsch https://bues.ch/
_______________________________________________
b43-dev mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/b43-dev