* [PATCH v2 1/3] staging: rtl8188eu: remove unused enum and CONFIG
@ 2015-06-12 10:50 Sudip Mukherjee
2015-06-12 10:50 ` [PATCH v2 2/3] staging: rtl8188eu: remove unused variables Sudip Mukherjee
2015-06-12 10:50 ` [PATCH v2 3/3] staging: rtl8188eu: remove function which does nothing Sudip Mukherjee
0 siblings, 2 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2015-06-12 10:50 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: devel, linux-kernel, Sudip Mukherjee
The CONFIGs, the enum and the function declaration was not being
used anywhere.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/rtl8188eu/include/odm.h | 8 --------
drivers/staging/rtl8188eu/include/odm_HWConfig.h | 3 ---
2 files changed, 11 deletions(-)
diff --git a/drivers/staging/rtl8188eu/include/odm.h b/drivers/staging/rtl8188eu/include/odm.h
index 525eb10..7b83d8c 100644
--- a/drivers/staging/rtl8188eu/include/odm.h
+++ b/drivers/staging/rtl8188eu/include/odm.h
@@ -918,14 +918,6 @@ enum ODM_RF_CONTENT {
odm_radiod_txt = 0x1003
};
-enum odm_bb_config_type {
- CONFIG_BB_PHY_REG,
- CONFIG_BB_AGC_TAB,
- CONFIG_BB_AGC_TAB_2G,
- CONFIG_BB_AGC_TAB_5G,
- CONFIG_BB_PHY_REG_PG,
-};
-
/* Status code */
enum rt_status {
RT_STATUS_SUCCESS,
diff --git a/drivers/staging/rtl8188eu/include/odm_HWConfig.h b/drivers/staging/rtl8188eu/include/odm_HWConfig.h
index 1de4e63..62a0049 100644
--- a/drivers/staging/rtl8188eu/include/odm_HWConfig.h
+++ b/drivers/staging/rtl8188eu/include/odm_HWConfig.h
@@ -120,7 +120,4 @@ void ODM_MacStatusQuery(struct odm_dm_struct *pDM_Odm,
bool bPacketToSelf,
bool bPacketBeacon);
-enum HAL_STATUS ODM_ConfigBBWithHeaderFile(struct odm_dm_struct *pDM_Odm,
- enum odm_bb_config_type ConfigType);
-
#endif
--
1.8.1.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 2/3] staging: rtl8188eu: remove unused variables
2015-06-12 10:50 [PATCH v2 1/3] staging: rtl8188eu: remove unused enum and CONFIG Sudip Mukherjee
@ 2015-06-12 10:50 ` Sudip Mukherjee
2015-06-12 10:50 ` [PATCH v2 3/3] staging: rtl8188eu: remove function which does nothing Sudip Mukherjee
1 sibling, 0 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2015-06-12 10:50 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: devel, linux-kernel, Sudip Mukherjee
These variables were being set but not used afterwards.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/rtl8188eu/core/rtw_mlme.c | 3 ---
drivers/staging/rtl8188eu/hal/phy.c | 10 ++--------
drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 2 --
drivers/staging/rtl8188eu/os_dep/osdep_service.c | 3 +--
4 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index a0f9f9e..0558451 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -638,7 +638,6 @@ exit:
void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
{
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
- struct mlme_ext_priv *pmlmeext;
spin_lock_bh(&pmlmepriv->lock);
@@ -720,8 +719,6 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
spin_unlock_bh(&pmlmepriv->lock);
rtw_os_xmit_schedule(adapter);
-
- pmlmeext = &adapter->mlmeextpriv;
}
void rtw_dummy_event_callback(struct adapter *adapter, u8 *pbuf)
diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c
index 6e4c3ee..2eafa50 100644
--- a/drivers/staging/rtl8188eu/hal/phy.c
+++ b/drivers/staging/rtl8188eu/hal/phy.c
@@ -629,7 +629,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 */
@@ -651,7 +651,6 @@ 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);
if (!(reg_eac & BIT28) &&
(((reg_e94 & 0x03FF0000)>>16) != 0x142) &&
@@ -1316,8 +1315,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] = {
@@ -1389,18 +1387,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;
@@ -1408,7 +1403,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 {
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
index 0156621..fca5909 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
@@ -151,7 +151,6 @@ void rtl8188e_InitHalDm(struct adapter *Adapter)
void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
{
- bool fw_cur_in_ps = false;
bool fw_ps_awake = true;
u8 hw_init_completed = false;
struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter);
@@ -163,7 +162,6 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
if (!hw_init_completed)
goto skip_dm;
- fw_cur_in_ps = Adapter->pwrctrlpriv.bFwCurrentInPSMode;
rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&fw_ps_awake));
/* Fw is under p2p powersaving mode, driver should stop dynamic mechanism. */
diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c
index abcb3a8..acb4eb1 100644
--- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c
@@ -134,7 +134,7 @@ void rtw_buf_free(u8 **buf, u32 *buf_len)
void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len)
{
- u32 ori_len = 0, dup_len = 0;
+ u32 dup_len = 0;
u8 *ori = NULL;
u8 *dup = NULL;
@@ -153,7 +153,6 @@ void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len)
keep_ori:
ori = *buf;
- ori_len = *buf_len;
/* replace buf with dup */
*buf_len = 0;
--
1.8.1.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 3/3] staging: rtl8188eu: remove function which does nothing
2015-06-12 10:50 [PATCH v2 1/3] staging: rtl8188eu: remove unused enum and CONFIG Sudip Mukherjee
2015-06-12 10:50 ` [PATCH v2 2/3] staging: rtl8188eu: remove unused variables Sudip Mukherjee
@ 2015-06-12 10:50 ` Sudip Mukherjee
1 sibling, 0 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2015-06-12 10:50 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: devel, linux-kernel, Sudip Mukherjee
The function rtw_mfree_all_stainfo() is just holding the lock,
traversing the list, and then unlocking. It is not doing anything else.
So removed the function and modified the places from where it was called.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
index 19b3a0d..b340e4a 100644
--- a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
@@ -143,32 +143,6 @@ inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int
return (struct sta_info *)(stapriv->pstainfo_buf + offset * sizeof(struct sta_info));
}
-/* this function is used to free the memory of lock || sema for all stainfos */
-static void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
-{
- struct list_head *plist, *phead;
- struct sta_info *psta = NULL;
-
-
- spin_lock_bh(&pstapriv->sta_hash_lock);
-
- phead = get_list_head(&pstapriv->free_sta_queue);
- plist = phead->next;
-
- while (phead != plist) {
- psta = container_of(plist, struct sta_info, list);
- plist = plist->next;
- }
-
- spin_unlock_bh(&pstapriv->sta_hash_lock);
-
-}
-
-static void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv)
-{
- rtw_mfree_all_stainfo(pstapriv); /* be done before free sta_hash_lock */
-}
-
u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
{
struct list_head *phead, *plist;
@@ -197,8 +171,6 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
spin_unlock_bh(&pstapriv->sta_hash_lock);
/*===============================*/
- rtw_mfree_sta_priv_lock(pstapriv);
-
if (pstapriv->pallocated_stainfo_buf)
vfree(pstapriv->pallocated_stainfo_buf);
}
--
1.8.1.2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-12 10:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 10:50 [PATCH v2 1/3] staging: rtl8188eu: remove unused enum and CONFIG Sudip Mukherjee
2015-06-12 10:50 ` [PATCH v2 2/3] staging: rtl8188eu: remove unused variables Sudip Mukherjee
2015-06-12 10:50 ` [PATCH v2 3/3] staging: rtl8188eu: remove function which does nothing Sudip Mukherjee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®