Skip to content

Commit

Permalink
brcm80211: remove sparse warning in fullmac debug function
Browse files Browse the repository at this point in the history
The debug function did a write operation which required a different
pointer type resulting in a sparse warning.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Arend van Spriel authored and John W. Linville committed Oct 14, 2011
1 parent 94bdc2a commit af53495
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/brcm80211/brcmfmac/dhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ extern int brcmf_proto_cdc_query_dcmd(struct brcmf_pub *drvr, int ifidx,
extern int brcmf_os_proto_block(struct brcmf_pub *drvr);
extern int brcmf_os_proto_unblock(struct brcmf_pub *drvr);
#ifdef BCMDBG
extern int brcmf_write_to_file(struct brcmf_pub *drvr, u8 *buf, int size);
extern int brcmf_write_to_file(struct brcmf_pub *drvr, const u8 *buf, int size);
#endif /* BCMDBG */

extern int brcmf_ifname2idx(struct brcmf_info *drvr_priv, char *name);
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ int brcmf_netdev_wait_pend8021x(struct net_device *ndev)
}

#ifdef BCMDBG
int brcmf_write_to_file(struct brcmf_pub *drvr, u8 *buf, int size)
int brcmf_write_to_file(struct brcmf_pub *drvr, const u8 *buf, int size)
{
int ret = 0;
struct file *fp;
Expand All @@ -1338,7 +1338,7 @@ int brcmf_write_to_file(struct brcmf_pub *drvr, u8 *buf, int size)
}

/* Write buf to file */
fp->f_op->write(fp, buf, size, &pos);
fp->f_op->write(fp, (char __user *)buf, size, &pos);

exit:
/* free buf before return */
Expand Down

0 comments on commit af53495

Please sign in to comment.