diff mbox series

[6/6] brcmfmac: Cleanup brcmf_fw_request_done()

Message ID 20181009124755.25402-6-hdegoede@redhat.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show
Series [1/6] brcmfmac: Remove firmware-loading code duplication | expand

Commit Message

Hans de Goede Oct. 9, 2018, 12:47 p.m. UTC
The "cur" variable is now only used for a debug print and we already
print the same info from brcmf_fw_complete_request(), so the debug print
does not provide any extra info and we can remove it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 .../net/wireless/broadcom/brcm80211/brcmfmac/firmware.c   | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Arend van Spriel Nov. 5, 2018, 11:42 a.m. UTC | #1
On 10/9/2018 2:47 PM, Hans de Goede wrote:
> The "cur" variable is now only used for a debug print and we already
> print the same info from brcmf_fw_complete_request(), so the debug print
> does not provide any extra info and we can remove it.

I guess this could have been collapsed in the first patch introducing 
brcmf_fw_complete_request(). All-in-all a nice cleanup. Thanks.

Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  .../net/wireless/broadcom/brcm80211/brcmfmac/firmware.c   | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
Hans de Goede Nov. 5, 2018, 2:34 p.m. UTC | #2
Hi,

On 05-11-18 12:42, Arend van Spriel wrote:
> On 10/9/2018 2:47 PM, Hans de Goede wrote:
>> The "cur" variable is now only used for a debug print and we already
>> print the same info from brcmf_fw_complete_request(), so the debug print
>> does not provide any extra info and we can remove it.
> 
> I guess this could have been collapsed in the first patch introducing brcmf_fw_complete_request(). All-in-all a nice cleanup. Thanks.

The idea of doing this in 2 separate patches is to make the first
patch (which is non trivial) easier to review.

Regards,

Hans


> 
> Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>  .../net/wireless/broadcom/brcm80211/brcmfmac/firmware.c   | 8 +-------
>>  1 file changed, 1 insertion(+), 7 deletions(-)
>
diff mbox series

Patch

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
index 6755b2388fbc..b38c4b40b235 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
@@ -560,22 +560,16 @@  static int brcmf_fw_request_firmware(const struct firmware **fw,
 static void brcmf_fw_request_done(const struct firmware *fw, void *ctx)
 {
 	struct brcmf_fw *fwctx = ctx;
-	struct brcmf_fw_item *cur;
-	int ret = 0;
-
-	cur = &fwctx->req->items[fwctx->curpos];
+	int ret;
 
 	ret = brcmf_fw_complete_request(fw, fwctx);
 
 	while (ret == 0 && ++fwctx->curpos < fwctx->req->n_items) {
-		cur = &fwctx->req->items[fwctx->curpos];
 		brcmf_fw_request_firmware(&fw, fwctx);
 		ret = brcmf_fw_complete_request(fw, ctx);
 	}
 
 	if (ret) {
-		brcmf_dbg(TRACE, "failed err=%d: dev=%s, fw=%s\n", ret,
-			  dev_name(fwctx->dev), cur->path);
 		brcmf_fw_free_request(fwctx->req);
 		fwctx->req = NULL;
 	}