brcmfmac: add missing curly braces in brcmf_fws_txstatus_suppressed()
authorArend van Spriel <arend@broadcom.com>
Thu, 12 Dec 2013 10:58:49 +0000 (11:58 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 18 Dec 2013 20:18:20 +0000 (15:18 -0500)
The 0-day testing from Fenguang Wu issued the following warning:

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git master
head:   4b074b07625f603d40d4d04937f8874a00415dc4
commit: 1e86d69662d7d86360624f74bbe1b5fa1b8ffb13
    [33/59] brcmfmac: Update fwsignal to fix out of order tx.

>> drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c:1393:2-56:
    code aligned with following code on line 1394

vim +1393 drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c

84bcc0c3  1387  }
84bcc0c3  1388
84bcc0c3  1389  entry->generation = genbit;
84bcc0c3  1390
2747e5f7  1391  ret = brcmf_proto_hdrpull(fws->drvr, false, &ifidx, skb);
2747e5f7  1392  if (ret == 0)
1e86d696 @1393  brcmf_skb_htod_tag_set_field(skb, GENERATION, ..
1e86d696 @1394  brcmf_skbcb(skb)->htod_seq = seq;
1e86d696  1395  if (brcmf_skb_htod_seq_get_field(skb, FROMFW)) {
1e86d696  1396  brcmf_skb_htod_seq_set_field(skb, ..
1e86d696  1397  brcmf_skb_htod_seq_set_field(skb, ..

This warning is valid and the if statement needs curly braces here.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c

index e9bdfdb95d8f06915fc734dd27053a3e092c046e..a5937840f0a7cfca1a1ca92ddfe672c12f0bd037 100644 (file)
@@ -1393,7 +1393,7 @@ static int brcmf_fws_txstatus_suppressed(struct brcmf_fws_info *fws, int fifo,
        entry->generation = genbit;
 
        ret = brcmf_proto_hdrpull(fws->drvr, false, &ifidx, skb);
-       if (ret == 0)
+       if (ret == 0) {
                brcmf_skb_htod_tag_set_field(skb, GENERATION, genbit);
                brcmf_skbcb(skb)->htod_seq = seq;
                if (brcmf_skb_htod_seq_get_field(skb, FROMFW)) {
@@ -1404,6 +1404,8 @@ static int brcmf_fws_txstatus_suppressed(struct brcmf_fws_info *fws, int fifo,
                }
                ret = brcmf_fws_enq(fws, BRCMF_FWS_SKBSTATE_SUPPRESSED, fifo,
                                    skb);
+       }
+
        if (ret != 0) {
                /* suppress q is full or hdrpull failed, drop this packet */
                brcmf_fws_hanger_poppkt(&fws->hanger, hslot, &skb,