staging: brcm80211: remove sparse warnings from mac80211_if.c
authorArend van Spriel <arend@broadcom.com>
Thu, 1 Sep 2011 09:17:12 +0000 (11:17 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Sep 2011 23:39:13 +0000 (16:39 -0700)
Some changes have been made to get rid of sparse warnings in the
source file mac80211_if.c.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmsmac/mac80211_if.c
drivers/staging/brcm80211/brcmsmac/mac80211_if.h

index bd9897379058811e6219855c5222b71c1c239058..6ed80b22af5668de1406ffaef4e445502bb9d7b5 100644 (file)
@@ -96,7 +96,7 @@ struct firmware_hdr {
        u32 idx;
 };
 
-char *brcms_firmwares[MAX_FW_IMAGES] = {
+static const char * const brcms_firmwares[MAX_FW_IMAGES] = {
        "brcm/bcm43xx",
        NULL
 };
@@ -1012,7 +1012,7 @@ static void brcms_free(struct brcms_info *wl)
         * after calling unregister_netdev() .
         */
        if (wl->regsva)
-               iounmap((void *)wl->regsva);
+               iounmap(wl->regsva);
 
        wl->regsva = NULL;
 }
@@ -1596,7 +1596,7 @@ struct brcms_timer *brcms_init_timer(struct brcms_info *wl,
        if (!t) {
                wiphy_err(wl->wiphy, "wl%d: brcms_init_timer: out of memory\n",
                          wl->pub->unit);
-               return 0;
+               return NULL;
        }
 
        init_timer(&t->timer);
index 1d528036019388979fffac9a583d6caee1739ec0..1eb36eda89da5d919ccc9b503fb1fb98b3ed87e2 100644 (file)
@@ -67,7 +67,7 @@ struct brcms_info {
        spinlock_t isr_lock;    /* per-device ISR synchronization lock */
 
        /* regsva for unmap in brcms_free() */
-       void *regsva;           /* opaque chip registers virtual address */
+       void __iomem *regsva;   /* opaque chip registers virtual address */
 
        /* timer related fields */
        atomic_t callbacks;     /* # outstanding callback functions */