[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1422714597-31736-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Date: Sat, 31 Jan 2015 15:29:57 +0100
From: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
navin patidar <navin.patidar@...il.com>
Cc: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH] staging: rtl8188eu: hal: phy: Removed variables that is never used
Variable was assigned a value that was never used.
I have also removed all the code that thereby serves no purpose.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
---
drivers/staging/rtl8188eu/hal/phy.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c
index 3f663fe..979f21c 100644
--- a/drivers/staging/rtl8188eu/hal/phy.c
+++ b/drivers/staging/rtl8188eu/hal/phy.c
@@ -721,7 +721,7 @@ void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt)
static u8 phy_path_a_iqk(struct adapter *adapt, bool config_pathb)
{
- u32 reg_eac, reg_e94, reg_e9c, reg_ea4;
+ u32 reg_eac, reg_e94, reg_e9c;
u8 result = 0x00;
/* 1 Tx IQK */
@@ -743,7 +743,7 @@ static u8 phy_path_a_iqk(struct adapter *adapt, bool config_pathb)
reg_eac = phy_query_bb_reg(adapt, rRx_Power_After_IQK_A_2, bMaskDWord);
reg_e94 = phy_query_bb_reg(adapt, rTx_Power_Before_IQK_A, bMaskDWord);
reg_e9c = phy_query_bb_reg(adapt, rTx_Power_After_IQK_A, bMaskDWord);
- reg_ea4 = phy_query_bb_reg(adapt, rRx_Power_Before_IQK_A_2, bMaskDWord);
+ phy_query_bb_reg(adapt, rRx_Power_Before_IQK_A_2, bMaskDWord);
if (!(reg_eac & BIT28) &&
(((reg_e94 & 0x03FF0000)>>16) != 0x142) &&
@@ -838,8 +838,8 @@ static u8 phy_path_a_rx_iqk(struct adapter *adapt, bool configPathB)
/* Check failed */
reg_eac = phy_query_bb_reg(adapt, rRx_Power_After_IQK_A_2, bMaskDWord);
- reg_e94 = phy_query_bb_reg(adapt, rTx_Power_Before_IQK_A, bMaskDWord);
- reg_e9c = phy_query_bb_reg(adapt, rTx_Power_After_IQK_A, bMaskDWord);
+ phy_query_bb_reg(adapt, rTx_Power_Before_IQK_A, bMaskDWord);
+ phy_query_bb_reg(adapt, rTx_Power_After_IQK_A, bMaskDWord);
reg_ea4 = phy_query_bb_reg(adapt, rRx_Power_Before_IQK_A_2, bMaskDWord);
/* reload RF 0xdf */
@@ -1416,8 +1416,7 @@ void rtl88eu_phy_iq_calibrate(struct adapter *adapt, bool recovery)
s32 result[4][8];
u8 i, final, chn_index;
bool pathaok, pathbok;
- s32 reg_e94, reg_e9c, reg_ea4, reg_eac, reg_eb4, reg_ebc, reg_ec4,
- reg_ecc;
+ s32 reg_e94, reg_e9c, reg_ea4, reg_eb4, reg_ebc, reg_ec4;
bool is12simular, is13simular, is23simular;
bool singletone = false, carrier_sup = false;
u32 iqk_bb_reg_92c[IQK_BB_REG_NUM] = {
@@ -1489,18 +1488,15 @@ void rtl88eu_phy_iq_calibrate(struct adapter *adapt, bool recovery)
reg_e94 = result[i][0];
reg_e9c = result[i][1];
reg_ea4 = result[i][2];
- reg_eac = result[i][3];
reg_eb4 = result[i][4];
reg_ebc = result[i][5];
reg_ec4 = result[i][6];
- reg_ecc = result[i][7];
}
if (final != 0xff) {
reg_e94 = result[final][0];
reg_e9c = result[final][1];
reg_ea4 = result[final][2];
- reg_eac = result[final][3];
reg_eb4 = result[final][4];
reg_ebc = result[final][5];
dm_odm->RFCalibrateInfo.RegE94 = reg_e94;
@@ -1508,7 +1504,6 @@ void rtl88eu_phy_iq_calibrate(struct adapter *adapt, bool recovery)
dm_odm->RFCalibrateInfo.RegEB4 = reg_eb4;
dm_odm->RFCalibrateInfo.RegEBC = reg_ebc;
reg_ec4 = result[final][6];
- reg_ecc = result[final][7];
pathaok = true;
pathbok = true;
} else {
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists