Skip to contentSkip to conversation

rtlwifi: rtl8821ae: remove unused variable

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Jun 13, 2017 – Jun 16, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtlwifi: rtl8821ae: remove unused variable

Remove unused variable rtlhal.

Addresses-Coverity-ID: 1248810

---
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c +0 -3
index 2bc6bac..d158e34 100644
@@ -1360,7 +1360,6 @@ static bool _rtl8821ae_reset_pcie_interface_dma(struct ieee80211_hw *hw,
 static void _rtl8821ae_get_wakeup_reason(struct ieee80211_hw *hw)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
-	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtlpriv);
 	u8 fw_reason = 0;
 	struct timeval ts;
@@ -1372,8 +1371,6 @@ static void _rtl8821ae_get_wakeup_reason(struct ieee80211_hw *hw)
 
 	ppsc->wakeup_reason = 0;
 
-	rtlhal->last_suspend_sec = ts.tv_sec;
-
 	switch (fw_reason) {
 	case FW_WOW_V2_PTK_UPDATE_EVENT:
 		ppsc->wakeup_reason = WOL_REASON_PTK_UPDATE;
Signature · 1 line
2.5.0
#1 lore raw
Quoted 5 lines · Gustavo A. R. Silva

Remove unused variable rtlhal.

Addresses-Coverity-ID: 1248810

---

NACK!! That variable is used in file core.c in driver rtlwifi, which is loaded and used by rtl8821ae.

Please do more than blindly follow Coverity outputs, or improve that tool!

Larry

Quoted 25 lines
  drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c +0 -3
index 2bc6bac..d158e34 100644
@@ -1360,7 +1360,6 @@ static bool _rtl8821ae_reset_pcie_interface_dma(struct ieee80211_hw *hw,
  static void _rtl8821ae_get_wakeup_reason(struct ieee80211_hw *hw)
  {
  	struct rtl_priv *rtlpriv = rtl_priv(hw);
-	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
  	struct rtl_ps_ctl *ppsc = rtl_psc(rtlpriv);
  	u8 fw_reason = 0;
  	struct timeval ts;
@@ -1372,8 +1371,6 @@ static void _rtl8821ae_get_wakeup_reason(struct ieee80211_hw *hw)
 
  	ppsc->wakeup_reason = 0;
 
-	rtlhal->last_suspend_sec = ts.tv_sec;
-
  	switch (fw_reason) {
  	case FW_WOW_V2_PTK_UPDATE_EVENT:
  		ppsc->wakeup_reason = WOL_REASON_PTK_UPDATE;