From patchwork Fri Mar 8 15:25:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Piotr Figiel X-Patchwork-Id: 10845055 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 13106139A for ; Fri, 8 Mar 2019 15:25:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1B0F2521E for ; Fri, 8 Mar 2019 15:25:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5FB92E115; Fri, 8 Mar 2019 15:25:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D38E2521E for ; Fri, 8 Mar 2019 15:25:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726429AbfCHPZt (ORCPT ); Fri, 8 Mar 2019 10:25:49 -0500 Received: from mail-eopbgr100066.outbound.protection.outlook.com ([40.107.10.66]:11645 "EHLO GBR01-LO2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726424AbfCHPZt (ORCPT ); Fri, 8 Mar 2019 10:25:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=camlinlimited.onmicrosoft.com; s=selector1-camlintechnologies-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L8uXgU1/4In7BiyADkKVZAoGe1wiiQHWXMWbjJDSDWI=; b=jfdos3D9sEXkxxC2EVRR4x/GxcGLro51kYZdvOJTdXKnbLnJmew5eVGo2ZFZiNKOxgc027lJHZbRpCffPLh9KJ6Ah7nTGpLCxMwqLmFAzMaP1zofpzF74sD3yNE2zO+F68/ekSeX/adVYmwm31hx1yNOid1CKSMIhOudlHvfXlk= Received: from LNXP123MB2185.GBRP123.PROD.OUTLOOK.COM (20.179.129.83) by LNXP123MB2106.GBRP123.PROD.OUTLOOK.COM (20.179.129.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.18; Fri, 8 Mar 2019 15:25:07 +0000 Received: from LNXP123MB2185.GBRP123.PROD.OUTLOOK.COM ([fe80::396a:e27e:d5dd:6bf0]) by LNXP123MB2185.GBRP123.PROD.OUTLOOK.COM ([fe80::396a:e27e:d5dd:6bf0%5]) with mapi id 15.20.1686.018; Fri, 8 Mar 2019 15:25:07 +0000 From: Piotr Figiel To: "linux-wireless@vger.kernel.org" , "arend.vanspriel@broadcom.com" , "kvalo@codeaurora.org" CC: "franky.lin@broadcom.com" , "hante.meuleman@broadcom.com" , "chi-hsien.lin@cypress.com" , "wright.feng@cypress.com" , "brcm80211-dev-list@cypress.com" , Pawel Lenkow , Lech Perczak , =?iso-8859-2?q?Krzysztof_D?= =?iso-8859-2?q?robi=F1ski?= , Piotr Figiel Subject: [PATCH 2/3] brcmfmac: remove pending parameter from brcmf_usb_free_q Thread-Topic: [PATCH 2/3] brcmfmac: remove pending parameter from brcmf_usb_free_q Thread-Index: AQHU1cMcob53qBcu4EepzJ+soxNvRA== Date: Fri, 8 Mar 2019 15:25:06 +0000 Message-ID: <1552058658-23250-3-git-send-email-p.figiel@camlintechnologies.com> References: <1552058658-23250-1-git-send-email-p.figiel@camlintechnologies.com> In-Reply-To: <1552058658-23250-1-git-send-email-p.figiel@camlintechnologies.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [95.143.242.242] x-clientproxiedby: DB6PR07CA0010.eurprd07.prod.outlook.com (2603:10a6:6:2d::20) To LNXP123MB2185.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:dc::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=p.figiel@camlintechnologies.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d9c6c8d7-a664-4286-6029-08d6a3da3e92 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020);SRVR:LNXP123MB2106; x-ms-traffictypediagnostic: LNXP123MB2106: x-microsoft-exchange-diagnostics: =?iso-8859-2?q?1=3BLNXP123MB2106=3B23=3AtE?= =?iso-8859-2?q?LjxLtU+8XRWf404igN51MQaqlfWr6wey/Vpc5dBZTZ9P7g/YXcQLEWj4ob6Z?= =?iso-8859-2?q?4x0ZNH3LXBVmAPlRDF+sFKzKNrltc7UZkiB6gdVv3TxdJgPUGMzFTXJJbFwW?= =?iso-8859-2?q?gWSlTVP8ccAxBQf2/LsGa+SE1YdFu39TLF4D8sApjabbi+pzQShn+UdBXb7f?= =?iso-8859-2?q?HZluxaWIXM4ZjxPzDhjyXqvwwWwIYa7nRW8wXif3cXPFRsVoPXcWPURyaaV+?= =?iso-8859-2?q?ozMWZifCgsUHs+xDxNq4sAMYzF5zT8FpnIPPmqFsqfEse26P5lRuhEyP3yH8?= =?iso-8859-2?q?9PE9RFA4PdpWyN6tlIc1OnDZU54C6MBUvHEUBecSS7JDSd4ie4zhFMCvd9UY?= =?iso-8859-2?q?GFBE3lrqAhhjVZj6VUOOCQ4+k887SNtOM19KYBO+x6VHomqVruJNsLktlPL6?= =?iso-8859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C2?= x-microsoft-antispam-prvs: x-forefront-prvs: 0970508454 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(136003)(346002)(396003)(366004)(39850400004)(189003)(199004)(8676002)(305945005)(97736004)(105586002)(486006)(99286004)(81166006)(3846002)(14454004)(81156014)(6116002)(476003)(106356001)(102836004)(6506007)(66066001)(186003)(6512007)(36756003)(26005)(110136005)(54906003)(6486002)(5660300002)(52116002)(446003)(2616005)(11346002)(386003)(2906002)(53936002)(107886003)(76176011)(71190400001)(71200400001)(86362001)(2201001)(50226002)(6436002)(316002)(4326008)(68736007)(14444005)(256004)(25786009)(7736002)(2501003)(8936002)(478600001);DIR:OUT;SFP:1101;SCL:1;SRVR:LNXP123MB2106;H:LNXP123MB2185.GBRP123.PROD.OUTLOOK.COM;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: camlintechnologies.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: A3iI4jQrIcGPh2xhV92KC5cbfMvNlTXyzJmkiI4cl/FWO/3i6O/fHEoo4NWHQiQ/bIZddsSDManV9wYQ7sMWRWQZQggp8R6ztURvfdvGDOzqq2KSb/i7FUWsmByh7SeqK3NbG2E5kktXhtpCW/47E0B3GpGiP0LKSbHr51jzF017jY10DxWyuZ1LNiSY6YJg9yWPEFlJ4VH9Z2tUtIHtt5s/9Ih7BV95oejAdX38EoVKoeue0gvXPmOh+NC2p0ImcuLjF/I7iEG4gdeXEktu/BubyTJ8/kYqKDlRePLQ7F79qqT90BfxVcoh037A7SN4zURYpjI1IZt32oJrXAJEeBLGaAd2u/9YR/wB5uQf88KnFkon5W34QCj3mPz3+Sr2OcypMuyEK+6KCKYBDjFJCB7IA9WuvHO0X9I1cYgi7CI= MIME-Version: 1.0 X-OriginatorOrg: camlintechnologies.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9c6c8d7-a664-4286-6029-08d6a3da3e92 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2019 15:25:06.9883 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fd4b1729-b18d-46d2-9ba0-2717b852b252 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: LNXP123MB2106 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP brcmf_usb_free_q is no longer called with pending=true thus this boolean parameter is no longer needed. Signed-off-by: Piotr Figiel --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c index a775409..5ab397d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c @@ -445,9 +445,10 @@ brcmf_usbdev_qinit(struct list_head *q, int qsize) } -static void brcmf_usb_free_q(struct list_head *q, bool pending) +static void brcmf_usb_free_q(struct list_head *q) { struct brcmf_usbreq *req, *next; + int i = 0; list_for_each_entry_safe(req, next, q, list) { if (!req->urb) { @@ -455,12 +456,8 @@ static void brcmf_usb_free_q(struct list_head *q, bool pending) break; } i++; - if (pending) { - usb_kill_urb(req->urb); - } else { - usb_free_urb(req->urb); - list_del_init(&req->list); - } + usb_free_urb(req->urb); + list_del_init(&req->list); } } @@ -1029,8 +1026,8 @@ static void brcmf_usb_detach(struct brcmf_usbdev_info *devinfo) brcmf_dbg(USB, "Enter, devinfo %p\n", devinfo); /* free the URBS */ - brcmf_usb_free_q(&devinfo->rx_freeq, false); - brcmf_usb_free_q(&devinfo->tx_freeq, false); + brcmf_usb_free_q(&devinfo->rx_freeq); + brcmf_usb_free_q(&devinfo->tx_freeq); usb_free_urb(devinfo->ctl_urb); usb_free_urb(devinfo->bulk_urb);