staging: rtl8723bs: HalBtc8723b1Ant.c: fix build warnings about unused variables
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 May 2021 06:41:33 +0000 (08:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 May 2021 09:41:13 +0000 (11:41 +0200)
0-day keeps spitting out annoying messages:

drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:2117:6: warning: variable 'u4Tmp' set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:2118:17: warning: variable 'u1Tmpb' set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:2118:5: warning: variable 'u1Tmpa' set but not used [-Wunused-but-set-variable]

So fix this up by just removing the storage of the values read.  Leave
the read from the hardware as odds are it is required in order to keep
it working properly as I do not have the hardware to test with.

Link: https://lore.kernel.org/r/20210520064133.1953156-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c

index e5464a2..518d535 100644 (file)
@@ -2114,9 +2114,6 @@ static void halbtc8723b1ant_InitHwConfig(
        bool bWifiOnly
 )
 {
-       u32 u4Tmp = 0;/*  fwVer; */
-       u8 u1Tmpa = 0, u1Tmpb = 0;
-
        pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x550, 0x8, 0x1);  /* enable TBTT nterrupt */
 
        /*  0x790[5:0]= 0x5 */
@@ -2136,9 +2133,9 @@ static void halbtc8723b1ant_InitHwConfig(
        /*  PTA parameter */
        halbtc8723b1ant_CoexTableWithType(pBtCoexist, FORCE_EXEC, 0);
 
-       u4Tmp = pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x948);
-       u1Tmpa = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x765);
-       u1Tmpb = pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x67);
+       pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x948);
+       pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x765);
+       pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x67);
 }
 
 /*  */