brcm80211: remove sparse warning in fullmac debug function
authorArend van Spriel <arend@broadcom.com>
Wed, 12 Oct 2011 18:51:14 +0000 (20:51 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 14 Oct 2011 18:48:16 +0000 (14:48 -0400)
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>
drivers/net/wireless/brcm80211/brcmfmac/dhd.h
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c

index 3ec74778b2e312667fb5b0b98960062a2b544c78..f58c0ebc2f1ace40d28bc280943733c31e46d340 100644 (file)
@@ -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);
index 03607cae3b8862c6a8798cc50bbd137150ad2930..aac6141afcded8ea62a57679f8cba64b57e4c25d 100644 (file)
@@ -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;
@@ -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 */