Skip to contentSkip to conversation

b43legacy: remove redundant mask bit set

PATCH In review Jeeva Anandh 2 participants 2 messages Jun 3 B43LEGACY wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 b43legacy: remove redundant mask bit set

mask is initialized to 0x0000001F, which already contains the 0x0010 bit. Therefore the conditional OR operation is redundant and can be removed.

---
 drivers/net/wireless/broadcom/b43legacy/main.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/wireless/broadcom/b43legacy/main.c +0 -2
index 6b3e0b2bbca7..d32bffa6f009 100644
@@ -1904,8 +1904,6 @@ static int b43legacy_gpio_init(struct b43legacy_wldev *dev)
 		mask |= 0x0200;
 		set |= 0x0200;
 	}
-	if (dev->dev->id.revision >= 2)
-		mask  |= 0x0010; /* FIXME: This is redundant. */
 
 #ifdef CONFIG_SSB_DRIVER_PCICORE
 	pcidev = bus->pcicore.dev;
Signature · 1 line
2.43.0
#1 lore raw
Quoted 14 lines · On Wed, 3 Jun 2026 12:53:31 +0000 Jeeva Anandh <[email protected]>…

mask is initialized to 0x0000001F, which already contains the 0x0010 bit. Therefore the conditional OR operation is redundant and can be removed.

---
 drivers/net/wireless/broadcom/b43legacy/main.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/wireless/broadcom/b43legacy/main.c +0 -0
index 6b3e0b2bbca7..d32bffa6f009 100644

drivers/net/wireless/broadcom/b43legacy/main.c static int b43legacy_gpio_init(struct b43legacy_wldev *dev) · line 1909

Quoted 8 lines
drivers/net/wireless/broadcom/b43legacy/main.c +0 -2
@@ -1904,8 +1904,6 @@ static int b43legacy_gpio_init(struct b43legacy_wldev *dev)
 		mask |= 0x0200;
 		set |= 0x0200;
 	}
-	if (dev->dev->id.revision >= 2)
-		mask  |= 0x0010; /* FIXME: This is redundant. */
 
 #ifdef CONFIG_SSB_DRIVER_PCICORE
 	pcidev = bus->pcicore.dev;

No, please don't just remove these things.
There is a FIXME in the comment, because the author already noticed that this was strange and that there probably is an unknown reason for this. Just removing this FIXME without clarifying the underlying reason does not improve the code quality.

Signature · 2 lines
Michael Büsch
https://bues.ch/

_______________________________________________
b43-dev mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/b43-dev