mac80211: brcmfmac: restructuring sdio access functions
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 311-v4.16-0010-brcmfmac-Rename-bcmerror-to-err.patch
1 From dd8a2d49e4ed321ab8e7b679499c3a98ccc5ca24 Mon Sep 17 00:00:00 2001
2 From: Ian Molton <ian@mnementh.co.uk>
3 Date: Mon, 13 Nov 2017 21:35:47 +0100
4 Subject: [PATCH] brcmfmac: Rename bcmerror to err
5
6 Trivial cleanup of nasty variable name
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 | 14 +++++++-------
13 1 file changed, 7 insertions(+), 7 deletions(-)
14
15 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
16 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
17 @@ -746,7 +746,7 @@ int
18 brcmf_sdiod_ramrw(struct brcmf_sdio_dev *sdiodev, bool write, u32 address,
19 u8 *data, uint size)
20 {
21 - int bcmerror = 0;
22 + int err = 0;
23 struct sk_buff *pkt;
24 u32 sdaddr;
25 uint dsize;
26 @@ -771,8 +771,8 @@ brcmf_sdiod_ramrw(struct brcmf_sdio_dev
27 /* Do the transfer(s) */
28 while (size) {
29 /* Set the backplane window to include the start address */
30 - bcmerror = brcmf_sdiod_set_sbaddr_window(sdiodev, address);
31 - if (bcmerror)
32 + err = brcmf_sdiod_set_sbaddr_window(sdiodev, address);
33 + if (err)
34 break;
35
36 brcmf_dbg(SDIO, "%s %d bytes at offset 0x%08x in window 0x%08x\n",
37 @@ -785,9 +785,9 @@ brcmf_sdiod_ramrw(struct brcmf_sdio_dev
38 skb_put(pkt, dsize);
39 if (write)
40 memcpy(pkt->data, data, dsize);
41 - bcmerror = brcmf_sdiod_buffrw(sdiodev, SDIO_FUNC_1, write,
42 - sdaddr, pkt);
43 - if (bcmerror) {
44 + err = brcmf_sdiod_buffrw(sdiodev, SDIO_FUNC_1, write, sdaddr,
45 + pkt);
46 + if (err) {
47 brcmf_err("membytes transfer failed\n");
48 break;
49 }
50 @@ -814,7 +814,7 @@ brcmf_sdiod_ramrw(struct brcmf_sdio_dev
51
52 sdio_release_host(sdiodev->func[1]);
53
54 - return bcmerror;
55 + return err;
56 }
57
58 int brcmf_sdiod_abort(struct brcmf_sdio_dev *sdiodev, u8 fn)