Skip to contentSkip to conversation

Fix sparse warnings

PATCH New Ksenija Stanojevic 1 participant 3 messages Oct 29, 2015 Staging

lore
Share & tools
lore
#0 lore raw

cover Fix sparse warnings

Remove EFUSE_Write1Byte and make Efuse_ReadAllMap function static

Found by sparse.

Ksenija Stanojevic (2):
Staging: rtl8723au: Remove unused EFUSE_Write1Byte function
Staging: rtl8723au: Declare function static

 drivers/staging/rtl8723au/core/rtw_efuse.c | 45 ++----------------------------
 1 file changed, 2 insertions(+), 43 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 Staging: rtl8723au: Remove unused EFUSE_Write1Byte function

Function is defined but not used, so remove it.

---
 drivers/staging/rtl8723au/core/rtw_efuse.c | 42 ------------------------------
 1 file changed, 42 deletions(-)
drivers/staging/rtl8723au/core/rtw_efuse.c +0 -42
index 906b578..5e8a1ba 100644
@@ -273,48 +273,6 @@ u8 EFUSE_Read1Byte23a(struct rtw_adapter *Adapter, u16 Address)
 		return 0xFF;
 }
 
-/* Copy from WMAC fot EFUSE write 1 byte. */
-void EFUSE_Write1Byte(struct rtw_adapter *Adapter, u16 Address, u8 Value)
-{
-	u8	Bytetemp = {0x00};
-	u8	temp = {0x00};
-	u32	k = 0;
-	u16	contentLen = 0;
-
-	EFUSE_GetEfuseDefinition23a(Adapter, EFUSE_WIFI,
-				 TYPE_EFUSE_REAL_CONTENT_LEN,
-				 (void *)&contentLen);
-
-	if (Address < contentLen) { /* E-fuse 512Byte */
-		rtl8723au_write8(Adapter, EFUSE_CTRL, Value);
-
-		/* Write E-fuse Register address bit0~7 */
-		temp = Address & 0xFF;
-		rtl8723au_write8(Adapter, EFUSE_CTRL+1, temp);
-		Bytetemp = rtl8723au_read8(Adapter, EFUSE_CTRL+2);
-
-		/* Write E-fuse Register address bit8~9 */
-		temp = ((Address >> 8) & 0x03) | (Bytetemp & 0xFC);
-		rtl8723au_write8(Adapter, EFUSE_CTRL+2, temp);
-
-		/* Write 0x30[31]= 1 */
-		Bytetemp = rtl8723au_read8(Adapter, EFUSE_CTRL+3);
-		temp = Bytetemp | 0x80;
-		rtl8723au_write8(Adapter, EFUSE_CTRL+3, temp);
-
-		/* Wait Write-ready (0x30[31]= 0) */
-		Bytetemp = rtl8723au_read8(Adapter, EFUSE_CTRL+3);
-		while (Bytetemp & 0x80) {
-			Bytetemp = rtl8723au_read8(Adapter, EFUSE_CTRL+3);
-			k++;
-			if (k == 100) {
-				k = 0;
-				break;
-			}
-		}
-	}
-}
-
 /* Read one byte from real Efuse. */
 int efuse_OneByteRead23a(struct rtw_adapter *pAdapter, u16 addr, u8 *data)
 {
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 Staging: rtl8723au: Declare function static

In reply to Ksenija Stanojevic

Declare function Efuse_ReadAllMap as static since it's defined and used only in this file.

---
 drivers/staging/rtl8723au/core/rtw_efuse.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8723au/core/rtw_efuse.c +2 -1
index 5e8a1ba..f174b4d 100644
@@ -459,7 +459,8 @@ int rtw_BT_efuse_map_read23a(struct rtw_adapter *padapter,
 }
 
 /* Read All Efuse content */
-void Efuse_ReadAllMap(struct rtw_adapter *pAdapter, u8 efuseType, u8 *Efuse)
+static void Efuse_ReadAllMap(struct rtw_adapter *pAdapter, u8 efuseType,
+			     u8 *Efuse)
 {
 	u16	mapLen = 0;
 
Signature · 1 line
1.9.1