305-v4.20-0001-brcmfmac-remove-set-but-not-used-variables-sfdoff-an.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From a8254fa4ba60b85829b6e5ede6564f81cd70d59f Mon Sep 17 00:00:00 2001
  2. From: YueHaibing <[email protected]>
  3. Date: Tue, 11 Sep 2018 11:24:04 +0800
  4. Subject: [PATCH] brcmfmac: remove set but not used variables 'sfdoff' and
  5. 'pad_size'
  6. Fixes gcc '-Wunused-but-set-variable' warning:
  7. drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function 'brcmf_sdio_rxglom':
  8. drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:1466:11: warning:
  9. variable 'sfdoff' set but not used [-Wunused-but-set-variable]
  10. drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function 'brcmf_sdio_bus_preinit':
  11. drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:3408:7: warning:
  12. variable 'pad_size' set but not used [-Wunused-but-set-variable]
  13. Signed-off-by: YueHaibing <[email protected]>
  14. Signed-off-by: Kalle Valo <[email protected]>
  15. ---
  16. drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 5 +----
  17. 1 file changed, 1 insertion(+), 4 deletions(-)
  18. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
  19. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
  20. @@ -1463,7 +1463,7 @@ static u8 brcmf_sdio_rxglom(struct brcmf
  21. struct sk_buff *pfirst, *pnext;
  22. int errcode;
  23. - u8 doff, sfdoff;
  24. + u8 doff;
  25. struct brcmf_sdio_hdrinfo rd_new;
  26. @@ -1597,7 +1597,6 @@ static u8 brcmf_sdio_rxglom(struct brcmf
  27. /* Remove superframe header, remember offset */
  28. skb_pull(pfirst, rd_new.dat_offset);
  29. - sfdoff = rd_new.dat_offset;
  30. num = 0;
  31. /* Validate all the subframe headers */
  32. @@ -3405,7 +3404,6 @@ static int brcmf_sdio_bus_preinit(struct
  33. struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
  34. struct brcmf_sdio *bus = sdiodev->bus;
  35. struct brcmf_core *core = bus->sdio_core;
  36. - uint pad_size;
  37. u32 value;
  38. int err;
  39. @@ -3448,7 +3446,6 @@ static int brcmf_sdio_bus_preinit(struct
  40. if (sdiodev->sg_support) {
  41. bus->txglom = false;
  42. value = 1;
  43. - pad_size = bus->sdiodev->func2->cur_blksize << 1;
  44. err = brcmf_iovar_data_set(bus->sdiodev->dev, "bus:rxglom",
  45. &value, sizeof(u32));
  46. if (err < 0) {