b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] b43: phy_n: Delete some useless TODO code
@ 2021-05-11  3:42 Zhen Lei
  2021-05-11  3:42 ` [PATCH v2 1/1] " Zhen Lei
  0 siblings, 1 reply; 3+ messages in thread
From: Zhen Lei @ 2021-05-11  3:42 UTC (permalink / raw)
  To: Kalle Valo, David S . Miller, Jakub Kicinski, Andrew Lunn,
	linux-wireless, b43-dev, netdev
  Cc: Zhen Lei

v1 --> v2:
Fixes "W=1" warnings. That's because after removing the todo code,
the local variables 'noise' and 'tone' are not referenced.

Thanks to Andrew Lunn for his review.


Zhen Lei (1):
  b43: phy_n: Delete some useless TODO code

 drivers/net/wireless/broadcom/b43/phy_n.c | 47 -----------------------
 1 file changed, 47 deletions(-)

-- 
2.26.0.106.g9fadedd



_______________________________________________
b43-dev mailing list
b43-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/b43-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2 1/1] b43: phy_n: Delete some useless TODO code
  2021-05-11  3:42 [PATCH v2 0/1] b43: phy_n: Delete some useless TODO code Zhen Lei
@ 2021-05-11  3:42 ` Zhen Lei
  2021-06-03  9:31   ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: Zhen Lei @ 2021-05-11  3:42 UTC (permalink / raw)
  To: Kalle Valo, David S . Miller, Jakub Kicinski, Andrew Lunn,
	linux-wireless, b43-dev, netdev
  Cc: Zhen Lei

These TODO empty code are added by
commit 9442e5b58edb ("b43: N-PHY: partly implement SPUR workaround"). It's
been more than a decade now. I don't think anyone who wants to perfect
this workaround can follow this TODO tip exactly. Instead, it limits them
to new thinking. Remove it will be better.

No functional change.

By the way, this helps reduce some binary code size.
Before:
text    data    bss     dec     hex
74472   9967    0       84439   149d7

After:
text    data    bss     dec     hex
74408   9919    0       84327   14967

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/net/wireless/broadcom/b43/phy_n.c | 47 -----------------------
 1 file changed, 47 deletions(-)

diff --git a/drivers/net/wireless/broadcom/b43/phy_n.c b/drivers/net/wireless/broadcom/b43/phy_n.c
index 665b737fbb0d820..cf3ccf4ddfe7230 100644
--- a/drivers/net/wireless/broadcom/b43/phy_n.c
+++ b/drivers/net/wireless/broadcom/b43/phy_n.c
@@ -4592,58 +4592,11 @@ static void b43_nphy_spur_workaround(struct b43_wldev *dev)
 {
 	struct b43_phy_n *nphy = dev->phy.n;
 
-	u8 channel = dev->phy.channel;
-	int tone[2] = { 57, 58 };
-	u32 noise[2] = { 0x3FF, 0x3FF };
-
 	B43_WARN_ON(dev->phy.rev < 3);
 
 	if (nphy->hang_avoid)
 		b43_nphy_stay_in_carrier_search(dev, 1);
 
-	if (nphy->gband_spurwar_en) {
-		/* TODO: N PHY Adjust Analog Pfbw (7) */
-		if (channel == 11 && b43_is_40mhz(dev)) {
-			; /* TODO: N PHY Adjust Min Noise Var(2, tone, noise)*/
-		} else {
-			; /* TODO: N PHY Adjust Min Noise Var(0, NULL, NULL)*/
-		}
-		/* TODO: N PHY Adjust CRS Min Power (0x1E) */
-	}
-
-	if (nphy->aband_spurwar_en) {
-		if (channel == 54) {
-			tone[0] = 0x20;
-			noise[0] = 0x25F;
-		} else if (channel == 38 || channel == 102 || channel == 118) {
-			if (0 /* FIXME */) {
-				tone[0] = 0x20;
-				noise[0] = 0x21F;
-			} else {
-				tone[0] = 0;
-				noise[0] = 0;
-			}
-		} else if (channel == 134) {
-			tone[0] = 0x20;
-			noise[0] = 0x21F;
-		} else if (channel == 151) {
-			tone[0] = 0x10;
-			noise[0] = 0x23F;
-		} else if (channel == 153 || channel == 161) {
-			tone[0] = 0x30;
-			noise[0] = 0x23F;
-		} else {
-			tone[0] = 0;
-			noise[0] = 0;
-		}
-
-		if (!tone[0] && !noise[0]) {
-			; /* TODO: N PHY Adjust Min Noise Var(1, tone, noise)*/
-		} else {
-			; /* TODO: N PHY Adjust Min Noise Var(0, NULL, NULL)*/
-		}
-	}
-
 	if (nphy->hang_avoid)
 		b43_nphy_stay_in_carrier_search(dev, 0);
 }
-- 
2.26.0.106.g9fadedd



_______________________________________________
b43-dev mailing list
b43-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/b43-dev

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/1] b43: phy_n: Delete some useless TODO code
  2021-05-11  3:42 ` [PATCH v2 1/1] " Zhen Lei
@ 2021-06-03  9:31   ` Kalle Valo
  0 siblings, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2021-06-03  9:31 UTC (permalink / raw)
  To: Zhen Lei
  Cc: David S . Miller, Jakub Kicinski, Andrew Lunn, linux-wireless,
	b43-dev, netdev, Zhen Lei

Zhen Lei <thunder.leizhen@huawei.com> wrote:

> These TODO empty code are added by
> commit 9442e5b58edb ("b43: N-PHY: partly implement SPUR workaround"). It's
> been more than a decade now. I don't think anyone who wants to perfect
> this workaround can follow this TODO tip exactly. Instead, it limits them
> to new thinking. Remove it will be better.
> 
> No functional change.
> 
> By the way, this helps reduce some binary code size.
> Before:
> text    data    bss     dec     hex
> 74472   9967    0       84439   149d7
> 
> After:
> text    data    bss     dec     hex
> 74408   9919    0       84327   14967
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>

Patch applied to wireless-drivers-next.git, thanks.

da16f5be45d0 b43: phy_n: Delete some useless TODO code

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210511034203.4122-2-thunder.leizhen@huawei.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
b43-dev mailing list
b43-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/b43-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-03  9:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11  3:42 [PATCH v2 0/1] b43: phy_n: Delete some useless TODO code Zhen Lei
2021-05-11  3:42 ` [PATCH v2 1/1] " Zhen Lei
2021-06-03  9:31   ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).