staging: rtl8192e: Remove unused variables in rtl_core.h
cover staging: rtl8192e: Remove unused variables in rtl_core.h
Remove unchanged and unused CamelCase variables that lead to dead code.
Tested with rtl8192e
Transferred this patch over wlan connection of rtl8192e
Philipp Hortmann (5):
staging: rtl8192e: Remove unchanged variable AcmMethod
staging: rtl8192e: Remove unused variable skb_aggQ
staging: rtl8192e: Remove unused variable initialized_at_probe
staging: rtl8192e: Remove unused variable ChannelAccessSetting
staging: rtl8192e: Remove unused variable int_log
drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 15 --------------- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 4 ---- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 7 ------- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 17 ----------------- drivers/staging/rtl8192e/rtl819x_Qos.h | 7 ------- drivers/staging/rtl8192e/rtllib.h | 1 - 6 files changed, 51 deletions(-)
Signature · 1 line
2.37.3
PATCH 1/5 staging: rtl8192e: Remove unchanged variable AcmMethod
AcmMethod is initialized and never changed. The evaluation will always have the same result. Remove resulting dead code.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 -- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 -- drivers/staging/rtl8192e/rtl819x_Qos.h | 7 ------- 4 files changed, 12 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +0 -2
@@ -224,8 +224,6 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val)u8 acm = pAciAifsn->f.acm;u8 AcmCtrl =rtl92e_readb (dev, AcmHwCtrl); - AcmCtrl = AcmCtrl | ((priv->AcmMethod ==2 ) ?0x0 :0x1 ); -if (acm) {switch (eACI) {case AC0_BE :
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +0 -1
@@ -830,7 +830,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)struct r8192_priv *priv =rtllib_priv (dev);u8 i; - priv->AcmMethod = eAcmWay2_SW; priv->dot11_current_preamble_mode =PREAMBLE_AUTO ; priv->rtllib->status =0 ; priv->polling_timer_on =0 ;
drivers/staging/rtl8192e/rtl8192e/rtl_core.h +0 -2
@@ -340,8 +340,6 @@ struct r8192_priv {struct bb_reg_definition PHYRegDef[4 ];struct rate_adaptive rate_adaptive; -enum acm_method AcmMethod; -struct rt_firmware *pFirmware;enum rtl819x_loopback LoopbackMode;
drivers/staging/rtl8192e/rtl819x_Qos.h +0 -7
@@ -97,13 +97,6 @@ enum direction_value { DIR_BI_DIR = 3, }; -enum acm_method { - eAcmWay0_SwAndHw =0 , - eAcmWay1_HW =1 , - eAcmWay2_SW =2 , -}; - -struct acm {u64 UsedTime;u64 MediumTime;
Signature · 1 line
2.37.3
PATCH 2/5 staging: rtl8192e: Remove unused variable skb_aggQ
In reply to Philipp Hortmannskb_aggQ is initialized, never used and purged. Remove resulting dead code.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 -- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 -- drivers/staging/rtl8192e/rtllib.h | 1 - 3 files changed, 5 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +0 -2
@@ -1946,8 +1946,6 @@ void rtl92e_stop_adapter(struct net_device *dev, bool reset)for (i =0 ; i <MAX_QUEUE_SIZE ; i++)skb_queue_purge (&priv->rtllib->skb_waitQ[i]); -for (i =0 ; i <MAX_QUEUE_SIZE ; i++) -skb_queue_purge (&priv->rtllib->skb_aggQ[i]);skb_queue_purge (&priv->skb_queue); }
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +0 -2
@@ -903,8 +903,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)for (i =0 ; i <MAX_QUEUE_SIZE ; i++)skb_queue_head_init (&priv->rtllib->skb_waitQ[i]); -for (i =0 ; i <MAX_QUEUE_SIZE ; i++) -skb_queue_head_init (&priv->rtllib->skb_aggQ[i]); }static void _rtl92e_init_priv_lock (struct r8192_priv *priv)
drivers/staging/rtl8192e/rtllib.h +0 -1
@@ -1624,7 +1624,6 @@ struct rtllib_device {int mgmt_queue_tail;u8 AsocRetryCount;struct sk_buff_head skb_waitQ[MAX_QUEUE_SIZE ]; -struct sk_buff_head skb_aggQ[MAX_QUEUE_SIZE ];bool bdynamic_txpower_enable;
Signature · 1 line
2.37.3
PATCH 3/5 staging: rtl8192e: Remove unused variable initialized_at_probe
In reply to Philipp Hortmanninitialized_at_probe is initialized and never used. Remove resulting dead code.
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 - 2 files changed, 2 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +0 -1
@@ -836,7 +836,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev) priv->up_first_time =1 ; priv->blinked_ingpio = false; priv->being_init_adapter = false; - priv->initialized_at_probe = false; priv->bdisable_nic = false; priv->bfirst_init = false; priv->txringcount =64 ;
drivers/staging/rtl8192e/rtl8192e/rtl_core.h +0 -1
@@ -309,7 +309,6 @@ struct r8192_priv {bool bfirst_init;bool bfirst_after_down; -bool initialized_at_probe;bool being_init_adapter;int irq;
Signature · 1 line
2.37.3
PATCH 4/5 staging: rtl8192e: Remove unused variable ChannelAccessSetting
In reply to Philipp HortmannChannelAccessSetting is never used. Remove resulting dead code.
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 12 ------------ 1 file changed, 12 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.h +0 -12
@@ -234,15 +234,6 @@ struct rt_stats {u32 CurrentShowTxate; }; -struct channel_access_setting { -u16 SIFS_Timer; -u16 DIFS_Timer; -u16 SlotTimeTimer; -u16 EIFS_Timer; -u16 CWminIndex; -u16 CWmaxIndex; -}; -struct init_gain {u8 xaagccore1;u8 xbagccore1;
@@ -321,9 +312,6 @@ struct r8192_priv {struct delayed_work txpower_tracking_wq;struct delayed_work rfpath_check_wq;struct delayed_work gpio_change_rf_wq; - -struct channel_access_setting ChannelAccessSetting; -struct rtl819x_ops *ops;struct rtllib_device *rtllib;
Signature · 1 line
2.37.3
PATCH 5/5 staging: rtl8192e: Remove unused variable int_log
In reply to Philipp Hortmannint_log is initialized and incremented but never evaluated. Remove resulting dead code.
--- drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 15 --------------- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 --- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 -- 3 files changed, 20 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8190P_def.h +0 -15
@@ -154,21 +154,6 @@ struct tx_fwinfo_8190pci { }; -struct log_int_8190 { -u32 nIMR_COMDOK; -u32 nIMR_MGNTDOK; -u32 nIMR_HIGH; -u32 nIMR_VODOK; -u32 nIMR_VIDOK; -u32 nIMR_BEDOK; -u32 nIMR_BKDOK; -u32 nIMR_ROK; -u32 nIMR_RCOK; -u32 nIMR_TBDOK; -u32 nIMR_BDOK; -u32 nIMR_RXFOVW; -}; -struct phy_ofdm_rx_status_rxsc_sgien_exintfflag {u8 reserved:4 ;u8 rxsc:2 ;
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +0 -3
@@ -866,8 +866,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev) priv->rst_progress =RESET_TYPE_NORESET ; priv->force_reset = false;memset (priv->rtllib->swcamtable,0 ,sizeof (struct sw_cam_table ) *32 ); - -memset (&priv->int_log,0 ,sizeof (struct log_int_8190 )); priv->rx_ctr =0 ; priv->rtllib->wx_set_enc =0 ; priv->hw_radio_off = false;
@@ -2185,7 +2183,6 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)if (inta &IMR_ROK ) { priv->stats.rxint++; - priv->int_log.nIMR_ROK++;tasklet_schedule (&priv->irq_rx_tasklet); }
drivers/staging/rtl8192e/rtl8192e/rtl_core.h +0 -2
@@ -317,8 +317,6 @@ struct r8192_priv {struct work_struct reset_wq; -struct log_int_8190 int_log; -enum rt_customer_id CustomerID;
Signature · 1 line
2.37.3