staging: brcm80211: removed last amd64 compiler warnings
authorRoland Vossen <rvossen@broadcom.com>
Tue, 5 Jul 2011 20:06:12 +0000 (22:06 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Jul 2011 02:41:42 +0000 (19:41 -0700)
Code cleanup. Warnings were due to pointer declarations being used for an
address that does not reside on the CPU bus.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/bcmsdh.c
drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
drivers/staging/brcm80211/brcmfmac/sdio_host.h

index 84d1bcdfcd76b45d257a2afa4cb8e65b0d3a6b1e..cecb29163f6dabfaedfdb1d8f6c454a90e9903fa 100644 (file)
@@ -67,7 +67,7 @@ struct brcmf_sdio_card {
 static struct brcmf_sdio_card *l_card;
 
 struct brcmf_sdio_card*
-brcmf_sdcard_attach(void *cfghdl, void **regsva, uint irq)
+brcmf_sdcard_attach(void *cfghdl, u32 *regsva, uint irq)
 {
        struct brcmf_sdio_card *card;
 
@@ -88,7 +88,7 @@ brcmf_sdcard_attach(void *cfghdl, void **regsva, uint irq)
 
        card->init_success = true;
 
-       *regsva = (u32 *) SI_ENUM_BASE;
+       *regsva = SI_ENUM_BASE;
 
        /* Report the BAR, to fix if needed */
        card->sbwad = SI_ENUM_BASE;
index 45fb76e60a192447a8a4529a6e75f23c185086ed..ec7d79dd1c3a13f5e1aac1ae7e0076ec97fb9e87 100644 (file)
@@ -68,7 +68,7 @@ EXPORT_SYMBOL(brcmf_sdio_remove);
 int brcmf_sdio_probe(struct device *dev)
 {
        struct sdio_hc *sdhc = NULL;
-       unsigned long regs = 0;
+       u32 regs = 0;
        struct brcmf_sdio_card *card = NULL;
        int irq = 0;
        u32 vendevid;
@@ -82,7 +82,7 @@ int brcmf_sdio_probe(struct device *dev)
        }
        sdhc->dev = (void *)dev;
 
-       card = brcmf_sdcard_attach((void *)0, (void **)&regs, irq);
+       card = brcmf_sdcard_attach((void *)0, &regs, irq);
        if (!card) {
                SDLX_MSG(("%s: attach failed\n", __func__));
                goto err;
@@ -101,7 +101,7 @@ int brcmf_sdio_probe(struct device *dev)
 
        /* try to attach to the target device */
        sdhc->ch = drvinfo.attach((vendevid >> 16), (vendevid & 0xFFFF),
-                                 0, 0, 0, 0, (void *)regs, card);
+                                 0, 0, 0, 0, regs, card);
        if (!sdhc->ch) {
                SDLX_MSG(("%s: device attach failed\n", __func__));
                goto err;
index 1b55e5671b3f042521982a360a6b1c3a48d62c8a..4c0a03184b0ef22466a9d0ca613afa7ad9c10d6d 100644 (file)
@@ -694,7 +694,7 @@ brcmf_sdioh_request_packet(struct sdioh_info *sd, uint fix_inc, uint write,
                 * is supposed to give
                 * us something we can work with.
                 */
-               ASSERT(((u32) (pkt->data) & DMA_ALIGN_MASK) == 0);
+               ASSERT(((ulong) (pkt->data) & DMA_ALIGN_MASK) == 0);
 
                if ((write) && (!fifo)) {
                        err_ret = sdio_memcpy_toio(gInstance->func[func], addr,
@@ -789,7 +789,7 @@ brcmf_sdioh_request_buffer(struct sdioh_info *sd, uint pio_dma, uint fix_inc,
                        memcpy(buffer, mypkt->data, buflen_u);
 
                brcmu_pkt_buf_free_skb(mypkt);
-       } else if (((u32) (pkt->data) & DMA_ALIGN_MASK) != 0) {
+       } else if (((ulong) (pkt->data) & DMA_ALIGN_MASK) != 0) {
                /* Case 2: We have a packet, but it is unaligned. */
 
                /* In this case, we cannot have a chain. */
index 9bc47a423ac38dc965e4552bcc176e85bde1e103..cdc57f9c914c340de5305bee12915f78b0e9389b 100644 (file)
@@ -884,7 +884,7 @@ static void brcmf_sdbrcm_release_malloc(struct brcmf_bus *bus);
 static void brcmf_sdbrcm_disconnect(void *ptr);
 static bool brcmf_sdbrcm_chipmatch(u16 chipid);
 static bool brcmf_sdbrcm_probe_attach(struct brcmf_bus *bus, void *card,
-                                void *regsva, u16 devid);
+                                     u32 regsva, u16 devid);
 static bool brcmf_sdbrcm_probe_malloc(struct brcmf_bus *bus, void *card);
 static bool brcmf_sdbrcm_probe_init(struct brcmf_bus *bus, void *card);
 static void brcmf_sdbrcm_release_dongle(struct brcmf_bus *bus);
@@ -908,7 +908,7 @@ static int brcmf_sdbrcm_download_nvram(struct brcmf_bus *bus);
 static void
 brcmf_sdbrcm_chip_disablecore(struct brcmf_sdio_card *card, u32 corebase);
 
-static int brcmf_sdbrcm_chip_attach(struct brcmf_bus *bus, void *regs);
+static int brcmf_sdbrcm_chip_attach(struct brcmf_bus *bus, u32 regs);
 
 static void
 brcmf_sdbrcm_chip_resetcore(struct brcmf_sdio_card *card, u32 corebase);
@@ -5343,7 +5343,7 @@ static bool brcmf_sdbrcm_chipmatch(u16 chipid)
 }
 
 static void *brcmf_sdbrcm_probe(u16 venid, u16 devid, u16 bus_no,
-                          u16 slot, u16 func, uint bustype, void *regsva,
+                          u16 slot, u16 func, uint bustype, u32 regsva,
                           void *card)
 {
        int ret;
@@ -5374,7 +5374,7 @@ static void *brcmf_sdbrcm_probe(u16 venid, u16 devid, u16 bus_no,
        DHD_INFO(("%s: venid 0x%04x devid 0x%04x\n", __func__, venid, devid));
 
        /* We make assumptions about address window mappings */
-       ASSERT((unsigned long)regsva == SI_ENUM_BASE);
+       ASSERT(regsva == SI_ENUM_BASE);
 
        /* SDIO car passes venid and devid based on CIS parsing -- but
         * low-power start
@@ -5540,7 +5540,7 @@ fail:
 }
 
 static bool
-brcmf_sdbrcm_probe_attach(struct brcmf_bus *bus, void *card, void *regsva,
+brcmf_sdbrcm_probe_attach(struct brcmf_bus *bus, void *card, u32 regsva,
                          u16 devid)
 {
        u8 clkctl = 0;
@@ -6097,8 +6097,8 @@ int brcmf_bus_devreset(struct brcmf_pub *drvr, u8 flag)
 
                        /* Attempt to re-attach & download */
                        if (brcmf_sdbrcm_probe_attach(bus, bus->card,
-                                                (u32 *) SI_ENUM_BASE,
-                                                bus->cl_devid)) {
+                                                     SI_ENUM_BASE,
+                                                     bus->cl_devid)) {
                                /* Attempt to download binary to the dongle */
                                if (brcmf_sdbrcm_probe_init(bus, bus->card)) {
                                        /* Re-init bus, enable F2 transfer */
@@ -6126,7 +6126,7 @@ int brcmf_bus_devreset(struct brcmf_pub *drvr, u8 flag)
 
 static int
 brcmf_sdbrcm_chip_recognition(struct brcmf_sdio_card *card,
-                             struct chip_info *ci, void *regs)
+                             struct chip_info *ci, u32 regs)
 {
        u32 regdata;
 
@@ -6136,7 +6136,7 @@ brcmf_sdbrcm_chip_recognition(struct brcmf_sdio_card *card,
         * For different chiptypes or old sdio hosts w/o chipcommon,
         * other ways of recognition should be added here.
         */
-       ci->cccorebase = (u32)regs;
+       ci->cccorebase = regs;
        regdata = brcmf_sdcard_reg_read(card,
                                CORE_CC_REG(ci->cccorebase, chipid), 4);
        ci->chip = regdata & CID_ID_MASK;
@@ -6263,7 +6263,7 @@ brcmf_sdbrcm_chip_disablecore(struct brcmf_sdio_card *card, u32 corebase)
 }
 
 static int
-brcmf_sdbrcm_chip_attach(struct brcmf_bus *bus, void *regs)
+brcmf_sdbrcm_chip_attach(struct brcmf_bus *bus, u32 regs)
 {
        struct chip_info *ci;
        int err;
index 68a2a64866034fc14b1b57cba70f3b4c9052fdfa..9b3c1494d760334fbaedbbe56440e1599667c32e 100644 (file)
@@ -52,8 +52,8 @@ struct brcmf_sdio_card;
  *    implementation may maintain a single "default" handle (e.g. the first or
  *    most recent one) to enable single-instance implementations to pass NULL.
  */
-extern struct brcmf_sdio_card *brcmf_sdcard_attach(void *cfghdl, void **regsva,
-                                         uint irq);
+extern struct brcmf_sdio_card*
+brcmf_sdcard_attach(void *cfghdl, u32 *regsva, uint irq);
 
 /* Detach - freeup resources allocated in attach */
 extern int brcmf_sdcard_detach(struct brcmf_sdio_card *card);
@@ -174,7 +174,7 @@ extern int brcmf_sdcard_iovar_op(struct brcmf_sdio_card *card, const char *name,
 struct brcmf_sdioh_driver {
        /* attach to device */
        void *(*attach) (u16 vend_id, u16 dev_id, u16 bus, u16 slot,
-                        u16 func, uint bustype, void *regsva, void *param);
+                        u16 func, uint bustype, u32 regsva, void *param);
        /* detach from device */
        void (*detach) (void *ch);
 };