Commit ef6cc1d6 authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

staging: brcm80211: remove sparse warning from main.c

The source file main.c contained several sparse warnings which
have been cleaned up.
Reported-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: default avatarFranky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8155f368
...@@ -880,7 +880,7 @@ static bool brcms_b_attach_dmapio(struct brcms_c_info *wlc, uint j, bool wme) ...@@ -880,7 +880,7 @@ static bool brcms_b_attach_dmapio(struct brcms_c_info *wlc, uint j, bool wme)
/* name and offsets for dma_attach */ /* name and offsets for dma_attach */
snprintf(name, sizeof(name), "wl%d", unit); snprintf(name, sizeof(name), "wl%d", unit);
if (wlc_hw->di[0] == 0) { /* Init FIFOs */ if (wlc_hw->di[0] == NULL) { /* Init FIFOs */
int dma_attach_err = 0; int dma_attach_err = 0;
/* /*
...@@ -5006,7 +5006,8 @@ static void brcms_c_update_mimo_band_bwcap(struct brcms_c_info *wlc, u8 bwcap) ...@@ -5006,7 +5006,8 @@ static void brcms_c_update_mimo_band_bwcap(struct brcms_c_info *wlc, u8 bwcap)
*/ */
struct brcms_c_info * struct brcms_c_info *
brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit, brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit,
bool piomode, void *regsva, struct pci_dev *btparam, uint *perr) bool piomode, void __iomem *regsva, struct pci_dev *btparam,
uint *perr)
{ {
struct brcms_c_info *wlc; struct brcms_c_info *wlc;
uint err = 0; uint err = 0;
...@@ -7096,8 +7097,8 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, ...@@ -7096,8 +7097,8 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw,
int len, phylen, rts_phylen; int len, phylen, rts_phylen;
u16 mch, phyctl, xfts, mainrates; u16 mch, phyctl, xfts, mainrates;
u16 seq = 0, mcl = 0, status = 0, frameid = 0; u16 seq = 0, mcl = 0, status = 0, frameid = 0;
u32 rspec[2] = { BRCM_RATE_1M, BRCM_RATE_1M }, rts_rspec[2] = { u32 rspec[2] = { BRCM_RATE_1M, BRCM_RATE_1M };
BRCM_RATE_1M, BRCM_RATE_1M}; u32 rts_rspec[2] = { BRCM_RATE_1M, BRCM_RATE_1M };
bool use_rts = false; bool use_rts = false;
bool use_cts = false; bool use_cts = false;
bool use_rifs = false; bool use_rifs = false;
...@@ -7741,8 +7742,7 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, ...@@ -7741,8 +7742,7 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw,
return 0; return 0;
} }
bool void brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc, struct sk_buff *sdu,
brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc, struct sk_buff *sdu,
struct ieee80211_hw *hw) struct ieee80211_hw *hw)
{ {
u8 prio; u8 prio;
...@@ -7760,10 +7760,9 @@ brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc, struct sk_buff *sdu, ...@@ -7760,10 +7760,9 @@ brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc, struct sk_buff *sdu,
if (unlikely if (unlikely
(brcms_c_d11hdrs_mac80211( (brcms_c_d11hdrs_mac80211(
wlc, hw, sdu, scb, 0, 1, fifo, 0, NULL, 0))) wlc, hw, sdu, scb, 0, 1, fifo, 0, NULL, 0)))
return -EINVAL; return;
brcms_c_txq_enq(wlc, scb, sdu, BRCMS_PRIO_TO_PREC(prio)); brcms_c_txq_enq(wlc, scb, sdu, BRCMS_PRIO_TO_PREC(prio));
brcms_c_send_q(wlc); brcms_c_send_q(wlc);
return 0;
} }
void brcms_c_send_q(struct brcms_c_info *wlc) void brcms_c_send_q(struct brcms_c_info *wlc)
...@@ -9100,7 +9099,7 @@ brcms_c_bcn_prb_template(struct brcms_c_info *wlc, u16 type, ...@@ -9100,7 +9099,7 @@ brcms_c_bcn_prb_template(struct brcms_c_info *wlc, u16 type,
return; return;
} }
int brcms_c_get_header_len() int brcms_c_get_header_len(void)
{ {
return TXOFF; return TXOFF;
} }
......
...@@ -536,7 +536,8 @@ struct brcms_antselcfg { ...@@ -536,7 +536,8 @@ struct brcms_antselcfg {
/* common functions for every port */ /* common functions for every port */
struct brcms_c_info * struct brcms_c_info *
brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit, brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device, uint unit,
bool piomode, void *regsva, struct pci_dev *btparam, uint *perr); bool piomode, void __iomem *regsva, struct pci_dev *btparam,
uint *perr);
extern uint brcms_c_detach(struct brcms_c_info *wlc); extern uint brcms_c_detach(struct brcms_c_info *wlc);
extern int brcms_c_up(struct brcms_c_info *wlc); extern int brcms_c_up(struct brcms_c_info *wlc);
extern uint brcms_c_down(struct brcms_c_info *wlc); extern uint brcms_c_down(struct brcms_c_info *wlc);
...@@ -553,7 +554,7 @@ extern void brcms_c_intrsrestore(struct brcms_c_info *wlc, u32 macintmask); ...@@ -553,7 +554,7 @@ extern void brcms_c_intrsrestore(struct brcms_c_info *wlc, u32 macintmask);
extern bool brcms_c_intrsupd(struct brcms_c_info *wlc); extern bool brcms_c_intrsupd(struct brcms_c_info *wlc);
extern bool brcms_c_isr(struct brcms_c_info *wlc, bool *wantdpc); extern bool brcms_c_isr(struct brcms_c_info *wlc, bool *wantdpc);
extern bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded); extern bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded);
extern bool brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc, extern void brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc,
struct sk_buff *sdu, struct sk_buff *sdu,
struct ieee80211_hw *hw); struct ieee80211_hw *hw);
extern int brcms_c_ioctl(struct brcms_c_info *wlc, int cmd, void *arg, int len, extern int brcms_c_ioctl(struct brcms_c_info *wlc, int cmd, void *arg, int len,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment