353-v5.4-brcmfmac-remove-set-but-not-used-variable-dtim_perio.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From cddecd92d1ec2fd05ed1123455e7c6cf6906b5a5 Mon Sep 17 00:00:00 2001
  2. From: YueHaibing <yuehaibing@huawei.com>
  3. Date: Wed, 24 Jul 2019 22:12:01 +0800
  4. Subject: [PATCH] brcmfmac: remove set but not used variable 'dtim_period'
  5. Fixes gcc '-Wunused-but-set-variable' warning:
  6. drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c: In function brcmf_update_bss_info:
  7. drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:2962:5: warning: variable dtim_period set but not used [-Wunused-but-set-variable]
  8. drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c: In function brcmf_update_bss_info:
  9. drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:2961:6: warning: variable beacon_interval set but not used [-Wunused-but-set-variable]
  10. They are never used so can be removed.
  11. Reported-by: Hulk Robot <hulkci@huawei.com>
  12. Signed-off-by: YueHaibing <yuehaibing@huawei.com>
  13. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  14. ---
  15. .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 8 +-------
  16. 1 file changed, 1 insertion(+), 7 deletions(-)
  17. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
  18. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
  19. @@ -3033,8 +3033,6 @@ static s32 brcmf_update_bss_info(struct
  20. struct brcmf_pub *drvr = cfg->pub;
  21. struct brcmf_bss_info_le *bi;
  22. const struct brcmf_tlv *tim;
  23. - u16 beacon_interval;
  24. - u8 dtim_period;
  25. size_t ie_len;
  26. u8 *ie;
  27. s32 err = 0;
  28. @@ -3058,12 +3056,9 @@ static s32 brcmf_update_bss_info(struct
  29. ie = ((u8 *)bi) + le16_to_cpu(bi->ie_offset);
  30. ie_len = le32_to_cpu(bi->ie_length);
  31. - beacon_interval = le16_to_cpu(bi->beacon_period);
  32. tim = brcmf_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
  33. - if (tim)
  34. - dtim_period = tim->data[1];
  35. - else {
  36. + if (!tim) {
  37. /*
  38. * active scan was done so we could not get dtim
  39. * information out of probe response.
  40. @@ -3075,7 +3070,6 @@ static s32 brcmf_update_bss_info(struct
  41. bphy_err(drvr, "wl dtim_assoc failed (%d)\n", err);
  42. goto update_bss_info_out;
  43. }
  44. - dtim_period = (u8)var;
  45. }
  46. update_bss_info_out: