zhengbin (6):
rtlwifi: Remove set but not used variable 'rtstate'
rtlwifi: Remove set but not used variables 'dataempty','hoffset'
rtlwifi: rtl8192ee: Remove set but not used variable 'err'
rtlwifi: rtl8192ee: Remove set but not used variables
'short_gi','buf_len'
rtlwifi: rtl8192ee: Remove set but not used variables
'reg_ecc','reg_eac'
rtlwifi: rtl8723be: Remove set but not used variables
'reg_ecc','reg_eac'
drivers/net/wireless/realtek/rtlwifi/efuse.c | 6 ++----
drivers/net/wireless/realtek/rtlwifi/ps.c | 3 ---
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 3 +--
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c | 8 ++------
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 8 --------
drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c | 8 ++------
6 files changed, 7 insertions(+), 29 deletions(-)
--
2.7.4
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c: In function rtl92ee_download_fw:
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c:111:6: warning: variable err set but not used [-Wunused-but-set-variable]
It is not used since commit c93ac39da006 ("rtlwifi:
Remove some redundant code")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: zhengbin <[email protected]>
---
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
index 67305ce..322798c 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
@@ -108,7 +108,6 @@ int rtl92ee_download_fw(struct ieee80211_hw *hw, bool buse_wake_on_wlan_fw)
struct rtlwifi_firmware_header *pfwheader;
u8 *pfwdata;
u32 fwsize;
- int err;
enum version_8192e version = rtlhal->version;
if (!rtlhal->pfirmware)
@@ -146,7 +145,7 @@ int rtl92ee_download_fw(struct ieee80211_hw *hw, bool buse_wake_on_wlan_fw)
_rtl92ee_write_fw(hw, version, pfwdata, fwsize);
_rtl92ee_enable_fw_download(hw, false);
- err = _rtl92ee_fw_free_to_go(hw);
+ (void)_rtl92ee_fw_free_to_go(hw);
return 0;
}
--
2.7.4
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c: In function rtl92ee_phy_iq_calibrate:
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c:2805:34: warning: variable reg_ecc set but not used [-Wunused-but-set-variable]
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c: In function rtl92ee_phy_iq_calibrate:
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c:2804:34: warning: variable reg_eac set but not used [-Wunused-but-set-variable]
They are not used since commit b1a3bfc97cd9 ("rtlwifi:
rtl8192ee: Move driver from staging to the regular tree")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: zhengbin <[email protected]>
---
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
index 222abc4..f03de8b 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/phy.c
@@ -2801,8 +2801,8 @@ void rtl92ee_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery)
long result[4][8];
u8 i, final_candidate;
bool b_patha_ok, b_pathb_ok;
- long reg_e94, reg_e9c, reg_ea4, reg_eac;
- long reg_eb4, reg_ebc, reg_ec4, reg_ecc;
+ long reg_e94, reg_e9c, reg_ea4;
+ long reg_eb4, reg_ebc, reg_ec4;
bool is12simular, is13simular, is23simular;
u8 idx;
u32 iqk_bb_reg[IQK_BB_REG_NUM] = {
@@ -2873,11 +2873,9 @@ void rtl92ee_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_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_candidate != 0xff) {
@@ -2886,13 +2884,11 @@ void rtl92ee_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery)
reg_e9c = result[final_candidate][1];
rtlphy->reg_e9c = reg_e9c;
reg_ea4 = result[final_candidate][2];
- reg_eac = result[final_candidate][3];
reg_eb4 = result[final_candidate][4];
rtlphy->reg_eb4 = reg_eb4;
reg_ebc = result[final_candidate][5];
rtlphy->reg_ebc = reg_ebc;
reg_ec4 = result[final_candidate][6];
- reg_ecc = result[final_candidate][7];
b_patha_ok = true;
b_pathb_ok = true;
} else {
--
2.7.4
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf
> Of zhengbin
> Sent: Monday, September 30, 2019 4:55 PM
> To: Pkshih; [email protected]; [email protected]; [email protected];
> [email protected]
> Cc: [email protected]
> Subject: [PATCH 3/6] rtlwifi: rtl8192ee: Remove set but not used variable 'err'
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c: In function rtl92ee_download_fw:
> drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c:111:6: warning: variable err set but not used
> [-Wunused-but-set-variable]
>
> It is not used since commit c93ac39da006 ("rtlwifi:
> Remove some redundant code")
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: zhengbin <[email protected]>
> ---
> drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
> index 67305ce..322798c 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c
> @@ -108,7 +108,6 @@ int rtl92ee_download_fw(struct ieee80211_hw *hw, bool buse_wake_on_wlan_fw)
> struct rtlwifi_firmware_header *pfwheader;
> u8 *pfwdata;
> u32 fwsize;
> - int err;
> enum version_8192e version = rtlhal->version;
>
> if (!rtlhal->pfirmware)
> @@ -146,7 +145,7 @@ int rtl92ee_download_fw(struct ieee80211_hw *hw, bool buse_wake_on_wlan_fw)
> _rtl92ee_write_fw(hw, version, pfwdata, fwsize);
> _rtl92ee_enable_fw_download(hw, false);
>
> - err = _rtl92ee_fw_free_to_go(hw);
> + (void)_rtl92ee_fw_free_to_go(hw);
>
> return 0;
After checking the flow, it's ok 'return _rtl92ee_fw_free_to_go(hw);'.
> }
> --
> 2.7.4
>
>
> ------Please consider the environment before printing this e-mail.
zhengbin <[email protected]> wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c: In function rtl92ee_download_fw:
> drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c:111:6: warning: variable err set but not used [-Wunused-but-set-variable]
>
> It is not used since commit c93ac39da006 ("rtlwifi:
> Remove some redundant code")
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: zhengbin <[email protected]>
Dropping this patch per Ping's comment, please fix and resend this
patch.
Patch set to Changes Requested.
--
https://patchwork.kernel.org/patch/11166207/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches