Skip to contentSkip to conversation

staging: rtl8723bs: Remove redundant initialization of variable efuseValue

PATCH In review Colin Ian King 2 participants 2 messages Oct 4, 2022

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

PATCH 1/1 staging: rtl8723bs: Remove redundant initialization of variable efuseValue

The variable efuseValue is being initialized with a value that is never read. The variable is being re-assigned later on. The initialization is redundant and can be removed.

Cleans up warning:
drivers/staging/rtl8723bs/core/rtw_efuse.c:285:6: warning: variable 'efuseValue' set but not used [-Wunused-but-set-variable]

---
 drivers/staging/rtl8723bs/core/rtw_efuse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +1 -1
index 06e727ce9cc2..eb848f9bbf2c 100644
@@ -282,7 +282,7 @@ u8 efuse_OneByteWrite(struct adapter *padapter, u16 addr, u8 data, bool bPseudoT
 {
 	u8 tmpidx = 0;
 	u8 bResult = false;
-	u32 efuseValue = 0;
+	u32 efuseValue;
 
 	if (bPseudoTest)
 		return Efuse_Write1ByteToFakeContent(addr, data);
Signature · 1 line
2.37.1
#1 lore raw
Quoted 18 lines · Colin Ian King

The variable efuseValue is being initialized with a value that is never read. The variable is being re-assigned later on. The initialization is redundant and can be removed.

Cleans up warning:
drivers/staging/rtl8723bs/core/rtw_efuse.c:285:6: warning: variable 'efuseValue' set but not used [-Wunused-but-set-variable]

---
  drivers/staging/rtl8723bs/core/rtw_efuse.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +0 -0
index 06e727ce9cc2..eb848f9bbf2c 100644

drivers/staging/rtl8723bs/core/rtw_efuse.c u8 efuse_OneByteWrite(struct adapter *padapter, u16 addr, u8 data, bool bPseudoT · line 288

Quoted 8 lines
drivers/staging/rtl8723bs/core/rtw_efuse.c +1 -1
@@ -282,7 +282,7 @@ u8 efuse_OneByteWrite(struct adapter *padapter, u16 addr, u8 data, bool bPseudoT
  {
  	u8 tmpidx = 0;
  	u8 bResult = false;
-	u32 efuseValue = 0;
+	u32 efuseValue;
 
  	if (bPseudoTest)
  		return Efuse_Write1ByteToFakeContent(addr, data);

I propose to remove all lines with efuseValue as it is dead code.

Make a v2 of this patch with version history below the ---

Thanks for your support.

Bye Philipp