342-v5.2-0002-brcmfmac-remove-pending-parameter-from-brcmf_usb_fre.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From 2b78e5f5223666d403d4fdb30af4ad65c8da3cdb Mon Sep 17 00:00:00 2001
  2. From: Piotr Figiel <p.figiel@camlintechnologies.com>
  3. Date: Fri, 8 Mar 2019 15:25:06 +0000
  4. Subject: [PATCH] brcmfmac: remove pending parameter from brcmf_usb_free_q
  5. brcmf_usb_free_q is no longer called with pending=true thus this boolean
  6. parameter is no longer needed.
  7. Signed-off-by: Piotr Figiel <p.figiel@camlintechnologies.com>
  8. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  9. ---
  10. .../wireless/broadcom/brcm80211/brcmfmac/usb.c | 15 ++++++---------
  11. 1 file changed, 6 insertions(+), 9 deletions(-)
  12. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
  13. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
  14. @@ -445,9 +445,10 @@ fail:
  15. }
  16. -static void brcmf_usb_free_q(struct list_head *q, bool pending)
  17. +static void brcmf_usb_free_q(struct list_head *q)
  18. {
  19. struct brcmf_usbreq *req, *next;
  20. +
  21. int i = 0;
  22. list_for_each_entry_safe(req, next, q, list) {
  23. if (!req->urb) {
  24. @@ -455,12 +456,8 @@ static void brcmf_usb_free_q(struct list
  25. break;
  26. }
  27. i++;
  28. - if (pending) {
  29. - usb_kill_urb(req->urb);
  30. - } else {
  31. - usb_free_urb(req->urb);
  32. - list_del_init(&req->list);
  33. - }
  34. + usb_free_urb(req->urb);
  35. + list_del_init(&req->list);
  36. }
  37. }
  38. @@ -1031,8 +1028,8 @@ static void brcmf_usb_detach(struct brcm
  39. brcmf_dbg(USB, "Enter, devinfo %p\n", devinfo);
  40. /* free the URBS */
  41. - brcmf_usb_free_q(&devinfo->rx_freeq, false);
  42. - brcmf_usb_free_q(&devinfo->tx_freeq, false);
  43. + brcmf_usb_free_q(&devinfo->rx_freeq);
  44. + brcmf_usb_free_q(&devinfo->tx_freeq);
  45. usb_free_urb(devinfo->ctl_urb);
  46. usb_free_urb(devinfo->bulk_urb);