Skip to contentSkip to conversation

wifi: mt76: mt7925: remove code guarded by nonexistent config option

PATCH In review Ethan Nelson-Moore 2 participants 2 messages Jun 10

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: mt76: mt7925: remove code guarded by nonexistent config option

A small piece of code in mt7925/regs.h depends on CONFIG_MT76_DEV, which has never been defined in the kernel. Remove this dead code.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

---
 drivers/net/wireless/mediatek/mt76/mt7925/regs.h | 4 ----
 1 file changed, 4 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7925/regs.h +0 -4
index 24985bba1b90..ea04e477a67c 100644
@@ -74,11 +74,7 @@
 #define MT_HIF_REMAP_BASE_L1		0x130000
 
 #define MT_HIF_REMAP_L2			0x0120
-#if IS_ENABLED(CONFIG_MT76_DEV)
-#define MT_HIF_REMAP_BASE_L2		(0x7c500000 - (0x7c000000 - 0x18000000))
-#else
 #define MT_HIF_REMAP_BASE_L2		0x18500000
-#endif
 
 #define MT_WFSYS_SW_RST_B		0x7c000140
 
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Ethan Nelson-Moore

A small piece of code in mt7925/regs.h depends on CONFIG_MT76_DEV, which has never been defined in the kernel. Remove this dead code.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

Quoted 20 lines
---
  drivers/net/wireless/mediatek/mt76/mt7925/regs.h | 4 ----
  1 file changed, 4 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7925/regs.h +0 -4
index 24985bba1b90..ea04e477a67c 100644
@@ -74,11 +74,7 @@
  #define MT_HIF_REMAP_BASE_L1		0x130000
 
  #define MT_HIF_REMAP_L2			0x0120
-#if IS_ENABLED(CONFIG_MT76_DEV)
-#define MT_HIF_REMAP_BASE_L2		(0x7c500000 - (0x7c000000 - 0x18000000))
-#else
  #define MT_HIF_REMAP_BASE_L2		0x18500000
-#endif
 
  #define MT_WFSYS_SW_RST_B		0x7c000140