Skip to contentSkip to conversation

staging: r8188eu: remove redundant variable reg_0x143

PATCH In review Colin Ian King 2 participants 2 messages Feb 24, 2022

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

PATCH 1/1 staging: r8188eu: remove redundant variable reg_0x143

Variable reg_0x143 is being assigned a value, however is not being read. The variable is redundant and can be removed.

---
 drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +1 -2
index cf58dfc3ff4d..53ebea311723 100644
@@ -189,7 +189,6 @@ static void efuse_read_phymap_from_txpktbuf(
 {
 	u16 dbg_addr = 0;
 	u32 start  = 0, passing_time = 0;
-	u8 reg_0x143 = 0;
 	__le32 lo32 = 0, hi32 = 0;
 	u16 len = 0, count = 0;
 	int i = 0;
@@ -209,7 +208,7 @@ static void efuse_read_phymap_from_txpktbuf(
 
 		rtw_write8(adapter, REG_TXPKTBUF_DBG, 0);
 		start = jiffies;
-		while (!(reg_0x143 = rtw_read8(adapter, REG_TXPKTBUF_DBG)) &&
+		while (!rtw_read8(adapter, REG_TXPKTBUF_DBG) &&
 		       (passing_time = rtw_get_passing_time_ms(start)) < 1000)
 			rtw_usleep_os(100);
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 32 lines · Colin Ian King

Variable reg_0x143 is being assigned a value, however is not being read. The variable is redundant and can be removed.

---
 drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +1 -2
index cf58dfc3ff4d..53ebea311723 100644
@@ -189,7 +189,6 @@ static void efuse_read_phymap_from_txpktbuf(
 {
 	u16 dbg_addr = 0;
 	u32 start  = 0, passing_time = 0;
-	u8 reg_0x143 = 0;
 	__le32 lo32 = 0, hi32 = 0;
 	u16 len = 0, count = 0;
 	int i = 0;
@@ -209,7 +208,7 @@ static void efuse_read_phymap_from_txpktbuf(
 
 		rtw_write8(adapter, REG_TXPKTBUF_DBG, 0);
 		start = jiffies;
-		while (!(reg_0x143 = rtw_read8(adapter, REG_TXPKTBUF_DBG)) &&
+		while (!rtw_read8(adapter, REG_TXPKTBUF_DBG) &&
 		       (passing_time = rtw_get_passing_time_ms(start)) < 1000)
 			rtw_usleep_os(100);
 
Signature · 1 line
2.34.1

Looks good to me, thanks Colin.

Regards,
Phil