mac80211: brcmfmac: restructuring sdio access functions - take 2
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 312-v4.16-0003-brcmfmac-Clarify-if-using-braces.patch
1 From a7323378dcf1f10a98f47b744e6f65e6fd671d84 Mon Sep 17 00:00:00 2001
2 From: Ian Molton <ian@mnementh.co.uk>
3 Date: Fri, 8 Dec 2017 13:10:28 +0100
4 Subject: [PATCH] brcmfmac: Clarify if using braces.
5
6 Whilst this if () statement is technically correct, it lacks clarity.
7
8 Signed-off-by: Ian Molton <ian@mnementh.co.uk>
9 Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
10 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
11 ---
12 drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 5 +++--
13 1 file changed, 3 insertions(+), 2 deletions(-)
14
15 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
16 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
17 @@ -746,16 +746,17 @@ int brcmf_sdiod_send_pkt(struct brcmf_sd
18 if (err)
19 return err;
20
21 - if (pktq->qlen == 1 || !sdiodev->sg_support)
22 + if (pktq->qlen == 1 || !sdiodev->sg_support) {
23 skb_queue_walk(pktq, skb) {
24 err = brcmf_sdiod_buff_write(sdiodev, SDIO_FUNC_2,
25 addr, skb);
26 if (err)
27 break;
28 }
29 - else
30 + } else {
31 err = brcmf_sdiod_sglist_rw(sdiodev, SDIO_FUNC_2, true, addr,
32 pktq);
33 + }
34
35 return err;
36 }