diff options
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/dhd_cdc.c | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/dhd_common.c | 15 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 32 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/wl_iw.c | 22 | ||||
-rw-r--r-- | drivers/staging/brcm80211/include/bcmutils.h | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/include/hnddma.h | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/include/linux_osl.h | 4 | ||||
-rw-r--r-- | drivers/staging/brcm80211/include/siutils.h | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/include/typedefs.h | 11 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_alloc.c | 6 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_mac80211.c | 16 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_rpc.h | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/util/aiutils.c | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/util/bcmutils.c | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/util/hnddma.c | 24 | ||||
-rw-r--r-- | drivers/staging/brcm80211/util/sbutils.c | 2 |
18 files changed, 68 insertions, 82 deletions
diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c index 2ed7cf212c51..e7ad60d98aff 100644 --- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c +++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c | |||
@@ -442,7 +442,7 @@ bcmsdh_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
442 | SDLX_MSG(("%s: Cannot enable PCI device\n", __func__)); | 442 | SDLX_MSG(("%s: Cannot enable PCI device\n", __func__)); |
443 | goto err; | 443 | goto err; |
444 | } | 444 | } |
445 | sdh = bcmsdh_attach(osh, (void *)(uintptr) pci_resource_start(pdev, 0), | 445 | sdh = bcmsdh_attach(osh, (void *)(unsigned long)pci_resource_start(pdev, 0), |
446 | (void **)®s, pdev->irq); | 446 | (void **)®s, pdev->irq); |
447 | if (!sdh) { | 447 | if (!sdh) { |
448 | SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__)); | 448 | SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__)); |
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c b/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c index 6bf321d32621..08aca6521f78 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c | |||
@@ -413,7 +413,7 @@ int dhd_prot_attach(dhd_pub_t *dhd) | |||
413 | } | 413 | } |
414 | 414 | ||
415 | /* ensure that the msg buf directly follows the cdc msg struct */ | 415 | /* ensure that the msg buf directly follows the cdc msg struct */ |
416 | if ((uintptr) (&cdc->msg + 1) != (uintptr) cdc->buf) { | 416 | if ((unsigned long)(&cdc->msg + 1) != (unsigned long)cdc->buf) { |
417 | DHD_ERROR(("dhd_prot_t is not correctly defined\n")); | 417 | DHD_ERROR(("dhd_prot_t is not correctly defined\n")); |
418 | goto fail; | 418 | goto fail; |
419 | } | 419 | } |
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_common.c b/drivers/staging/brcm80211/brcmfmac/dhd_common.c index f0155e0361fe..41063f9f36e5 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_common.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_common.c | |||
@@ -1476,7 +1476,7 @@ int dhd_iscan_print_cache(iscan_buf_t *iscan_skip) | |||
1476 | bi->BSSID.octet[2], bi->BSSID.octet[3], | 1476 | bi->BSSID.octet[2], bi->BSSID.octet[3], |
1477 | bi->BSSID.octet[4], bi->BSSID.octet[5])); | 1477 | bi->BSSID.octet[4], bi->BSSID.octet[5])); |
1478 | 1478 | ||
1479 | bi = (wl_bss_info_t *) ((uintptr) bi + | 1479 | bi = (wl_bss_info_t *)((unsigned long)bi + |
1480 | dtoh32(bi->length)); | 1480 | dtoh32(bi->length)); |
1481 | } | 1481 | } |
1482 | iscan_cur = iscan_cur->next; | 1482 | iscan_cur = iscan_cur->next; |
@@ -1541,7 +1541,7 @@ int dhd_iscan_delete_bss(void *dhdp, void *addr, iscan_buf_t *iscan_skip) | |||
1541 | bi->BSSID.octet[5])); | 1541 | bi->BSSID.octet[5])); |
1542 | 1542 | ||
1543 | bi_new = bi; | 1543 | bi_new = bi; |
1544 | bi = (wl_bss_info_t *) ((uintptr) bi + | 1544 | bi = (wl_bss_info_t *)((unsigned long)bi + |
1545 | dtoh32 | 1545 | dtoh32 |
1546 | (bi->length)); | 1546 | (bi->length)); |
1547 | /* | 1547 | /* |
@@ -1567,17 +1567,14 @@ int dhd_iscan_delete_bss(void *dhdp, void *addr, iscan_buf_t *iscan_skip) | |||
1567 | bi->BSSID.octet[5])); | 1567 | bi->BSSID.octet[5])); |
1568 | 1568 | ||
1569 | bi_next = | 1569 | bi_next = |
1570 | (wl_bss_info_t | 1570 | (wl_bss_info_t *)((unsigned long)bi + |
1571 | *) ((uintptr) bi + | ||
1572 | dtoh32 | 1571 | dtoh32 |
1573 | (bi->length)); | 1572 | (bi->length)); |
1574 | bcopy(bi, bi_new, | 1573 | bcopy(bi, bi_new, |
1575 | dtoh32 | 1574 | dtoh32 |
1576 | (bi->length)); | 1575 | (bi->length)); |
1577 | bi_new = | 1576 | bi_new = |
1578 | (wl_bss_info_t | 1577 | (wl_bss_info_t *)((unsigned long)bi_new + |
1579 | *) ((uintptr) | ||
1580 | bi_new + | ||
1581 | dtoh32 | 1578 | dtoh32 |
1582 | (bi_new-> | 1579 | (bi_new-> |
1583 | length)); | 1580 | length)); |
@@ -1594,7 +1591,7 @@ int dhd_iscan_delete_bss(void *dhdp, void *addr, iscan_buf_t *iscan_skip) | |||
1594 | } | 1591 | } |
1595 | break; | 1592 | break; |
1596 | } | 1593 | } |
1597 | bi = (wl_bss_info_t *) ((uintptr) bi + | 1594 | bi = (wl_bss_info_t *)((unsigned long)bi + |
1598 | dtoh32(bi->length)); | 1595 | dtoh32(bi->length)); |
1599 | } | 1596 | } |
1600 | } | 1597 | } |
@@ -1649,7 +1646,7 @@ int dhd_iscan_remove_duplicates(void *dhdp, iscan_buf_t *iscan_cur) | |||
1649 | 1646 | ||
1650 | dhd_iscan_delete_bss(dhdp, bi->BSSID.octet, iscan_cur); | 1647 | dhd_iscan_delete_bss(dhdp, bi->BSSID.octet, iscan_cur); |
1651 | 1648 | ||
1652 | bi = (wl_bss_info_t *) ((uintptr) bi + dtoh32(bi->length)); | 1649 | bi = (wl_bss_info_t *)((unsigned long)bi + dtoh32(bi->length)); |
1653 | } | 1650 | } |
1654 | 1651 | ||
1655 | done: | 1652 | done: |
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c index e3ef1a765c60..fd4c91ee3ca4 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | |||
@@ -358,7 +358,7 @@ extern void bcmsdh_enable_hw_oob_intr(void *sdh, bool enable); | |||
358 | #define PKTALIGN(osh, p, len, align) \ | 358 | #define PKTALIGN(osh, p, len, align) \ |
359 | do { \ | 359 | do { \ |
360 | uint datalign; \ | 360 | uint datalign; \ |
361 | datalign = (uintptr)PKTDATA((p)); \ | 361 | datalign = (unsigned long)PKTDATA((p)); \ |
362 | datalign = roundup(datalign, (align)) - datalign; \ | 362 | datalign = roundup(datalign, (align)) - datalign; \ |
363 | ASSERT(datalign < (align)); \ | 363 | ASSERT(datalign < (align)); \ |
364 | ASSERT(PKTLEN((p)) >= ((len) + datalign)); \ | 364 | ASSERT(PKTLEN((p)) >= ((len) + datalign)); \ |
@@ -924,7 +924,7 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt) | |||
924 | frame = (u8 *) PKTDATA(pkt); | 924 | frame = (u8 *) PKTDATA(pkt); |
925 | 925 | ||
926 | /* Add alignment padding, allocate new packet if needed */ | 926 | /* Add alignment padding, allocate new packet if needed */ |
927 | pad = ((uintptr) frame % DHD_SDALIGN); | 927 | pad = ((unsigned long)frame % DHD_SDALIGN); |
928 | if (pad) { | 928 | if (pad) { |
929 | if (PKTHEADROOM(pkt) < pad) { | 929 | if (PKTHEADROOM(pkt) < pad) { |
930 | DHD_INFO(("%s: insufficient headroom %d for %d pad\n", | 930 | DHD_INFO(("%s: insufficient headroom %d for %d pad\n", |
@@ -947,7 +947,7 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, void *pkt, uint chan, bool free_pkt) | |||
947 | free_pkt = true; | 947 | free_pkt = true; |
948 | pkt = new; | 948 | pkt = new; |
949 | frame = (u8 *) PKTDATA(pkt); | 949 | frame = (u8 *) PKTDATA(pkt); |
950 | ASSERT(((uintptr) frame % DHD_SDALIGN) == 0); | 950 | ASSERT(((unsigned long)frame % DHD_SDALIGN) == 0); |
951 | pad = 0; | 951 | pad = 0; |
952 | } else { | 952 | } else { |
953 | PKTPUSH(pkt, pad); | 953 | PKTPUSH(pkt, pad); |
@@ -1087,7 +1087,7 @@ int dhd_bus_txdata(struct dhd_bus *bus, void *pkt) | |||
1087 | 1087 | ||
1088 | /* Add space for the header */ | 1088 | /* Add space for the header */ |
1089 | PKTPUSH(pkt, SDPCM_HDRLEN); | 1089 | PKTPUSH(pkt, SDPCM_HDRLEN); |
1090 | ASSERT(IS_ALIGNED((uintptr) PKTDATA(pkt), 2)); | 1090 | ASSERT(IS_ALIGNED((unsigned long)PKTDATA(pkt), 2)); |
1091 | 1091 | ||
1092 | prec = PRIO2PREC((PKTPRIO(pkt) & PRIOMASK)); | 1092 | prec = PRIO2PREC((PKTPRIO(pkt) & PRIOMASK)); |
1093 | 1093 | ||
@@ -1241,7 +1241,7 @@ int dhd_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen) | |||
1241 | 1241 | ||
1242 | /* Add alignment padding (optional for ctl frames) */ | 1242 | /* Add alignment padding (optional for ctl frames) */ |
1243 | if (dhd_alignctl) { | 1243 | if (dhd_alignctl) { |
1244 | doff = ((uintptr) frame % DHD_SDALIGN); | 1244 | doff = ((unsigned long)frame % DHD_SDALIGN); |
1245 | if (doff) { | 1245 | if (doff) { |
1246 | frame -= doff; | 1246 | frame -= doff; |
1247 | len += doff; | 1247 | len += doff; |
@@ -1265,7 +1265,7 @@ int dhd_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen) | |||
1265 | if (forcealign && (len & (ALIGNMENT - 1))) | 1265 | if (forcealign && (len & (ALIGNMENT - 1))) |
1266 | len = roundup(len, ALIGNMENT); | 1266 | len = roundup(len, ALIGNMENT); |
1267 | 1267 | ||
1268 | ASSERT(IS_ALIGNED((uintptr) frame, 2)); | 1268 | ASSERT(IS_ALIGNED((unsigned long)frame, 2)); |
1269 | 1269 | ||
1270 | /* Need to lock here to protect txseq and SDIO tx calls */ | 1270 | /* Need to lock here to protect txseq and SDIO tx calls */ |
1271 | dhd_os_sdlock(bus->dhd); | 1271 | dhd_os_sdlock(bus->dhd); |
@@ -2336,7 +2336,7 @@ dhdsdio_doiovar(dhd_bus_t *bus, const bcm_iovar_t *vi, u32 actionid, | |||
2336 | 2336 | ||
2337 | sd_ptr = (sdreg_t *) params; | 2337 | sd_ptr = (sdreg_t *) params; |
2338 | 2338 | ||
2339 | addr = (uintptr) bus->regs + sd_ptr->offset; | 2339 | addr = (unsigned long)bus->regs + sd_ptr->offset; |
2340 | size = sd_ptr->func; | 2340 | size = sd_ptr->func; |
2341 | int_val = (s32) bcmsdh_reg_read(bus->sdh, addr, size); | 2341 | int_val = (s32) bcmsdh_reg_read(bus->sdh, addr, size); |
2342 | if (bcmsdh_regfail(bus->sdh)) | 2342 | if (bcmsdh_regfail(bus->sdh)) |
@@ -2352,7 +2352,7 @@ dhdsdio_doiovar(dhd_bus_t *bus, const bcm_iovar_t *vi, u32 actionid, | |||
2352 | 2352 | ||
2353 | sd_ptr = (sdreg_t *) params; | 2353 | sd_ptr = (sdreg_t *) params; |
2354 | 2354 | ||
2355 | addr = (uintptr) bus->regs + sd_ptr->offset; | 2355 | addr = (unsigned long)bus->regs + sd_ptr->offset; |
2356 | size = sd_ptr->func; | 2356 | size = sd_ptr->func; |
2357 | bcmsdh_reg_write(bus->sdh, addr, size, sd_ptr->value); | 2357 | bcmsdh_reg_write(bus->sdh, addr, size, sd_ptr->value); |
2358 | if (bcmsdh_regfail(bus->sdh)) | 2358 | if (bcmsdh_regfail(bus->sdh)) |
@@ -3086,7 +3086,7 @@ dhdsdio_read_control(dhd_bus_t *bus, u8 *hdr, uint len, uint doff) | |||
3086 | bus->rxctl = bus->rxbuf; | 3086 | bus->rxctl = bus->rxbuf; |
3087 | if (dhd_alignctl) { | 3087 | if (dhd_alignctl) { |
3088 | bus->rxctl += firstread; | 3088 | bus->rxctl += firstread; |
3089 | pad = ((uintptr) bus->rxctl % DHD_SDALIGN); | 3089 | pad = ((unsigned long)bus->rxctl % DHD_SDALIGN); |
3090 | if (pad) | 3090 | if (pad) |
3091 | bus->rxctl += (DHD_SDALIGN - pad); | 3091 | bus->rxctl += (DHD_SDALIGN - pad); |
3092 | bus->rxctl -= firstread; | 3092 | bus->rxctl -= firstread; |
@@ -3681,7 +3681,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) | |||
3681 | bus->rxctl = bus->rxbuf; | 3681 | bus->rxctl = bus->rxbuf; |
3682 | if (dhd_alignctl) { | 3682 | if (dhd_alignctl) { |
3683 | bus->rxctl += firstread; | 3683 | bus->rxctl += firstread; |
3684 | pad = ((uintptr) bus->rxctl % | 3684 | pad = ((unsigned long)bus->rxctl % |
3685 | DHD_SDALIGN); | 3685 | DHD_SDALIGN); |
3686 | if (pad) | 3686 | if (pad) |
3687 | bus->rxctl += | 3687 | bus->rxctl += |
@@ -5091,7 +5091,7 @@ static void *dhdsdio_probe(u16 venid, u16 devid, u16 bus_no, | |||
5091 | DHD_INFO(("%s: venid 0x%04x devid 0x%04x\n", __func__, venid, devid)); | 5091 | DHD_INFO(("%s: venid 0x%04x devid 0x%04x\n", __func__, venid, devid)); |
5092 | 5092 | ||
5093 | /* We make assumptions about address window mappings */ | 5093 | /* We make assumptions about address window mappings */ |
5094 | ASSERT((uintptr) regsva == SI_ENUM_BASE); | 5094 | ASSERT((unsigned long)regsva == SI_ENUM_BASE); |
5095 | 5095 | ||
5096 | /* BCMSDH passes venid and devid based on CIS parsing -- but | 5096 | /* BCMSDH passes venid and devid based on CIS parsing -- but |
5097 | * low-power start | 5097 | * low-power start |
@@ -5363,7 +5363,7 @@ dhdsdio_probe_attach(struct dhd_bus *bus, osl_t *osh, void *sdh, void *regsva, | |||
5363 | pktq_init(&bus->txq, (PRIOMASK + 1), QLEN); | 5363 | pktq_init(&bus->txq, (PRIOMASK + 1), QLEN); |
5364 | 5364 | ||
5365 | /* Locate an appropriately-aligned portion of hdrbuf */ | 5365 | /* Locate an appropriately-aligned portion of hdrbuf */ |
5366 | bus->rxhdr = (u8 *) roundup((uintptr)&bus->hdrbuf[0], DHD_SDALIGN); | 5366 | bus->rxhdr = (u8 *) roundup((unsigned long)&bus->hdrbuf[0], DHD_SDALIGN); |
5367 | 5367 | ||
5368 | /* Set the poll and/or interrupt flags */ | 5368 | /* Set the poll and/or interrupt flags */ |
5369 | bus->intr = (bool) dhd_intr; | 5369 | bus->intr = (bool) dhd_intr; |
@@ -5405,10 +5405,10 @@ static bool dhdsdio_probe_malloc(dhd_bus_t *bus, osl_t *osh, void *sdh) | |||
5405 | } | 5405 | } |
5406 | 5406 | ||
5407 | /* Align the buffer */ | 5407 | /* Align the buffer */ |
5408 | if ((uintptr) bus->databuf % DHD_SDALIGN) | 5408 | if ((unsigned long)bus->databuf % DHD_SDALIGN) |
5409 | bus->dataptr = | 5409 | bus->dataptr = |
5410 | bus->databuf + (DHD_SDALIGN - | 5410 | bus->databuf + (DHD_SDALIGN - |
5411 | ((uintptr) bus->databuf % DHD_SDALIGN)); | 5411 | ((unsigned long)bus->databuf % DHD_SDALIGN)); |
5412 | else | 5412 | else |
5413 | bus->dataptr = bus->databuf; | 5413 | bus->dataptr = bus->databuf; |
5414 | 5414 | ||
@@ -5739,9 +5739,9 @@ static int dhdsdio_download_code_file(struct dhd_bus *bus, char *fw_path) | |||
5739 | __func__, MEMBLOCK)); | 5739 | __func__, MEMBLOCK)); |
5740 | goto err; | 5740 | goto err; |
5741 | } | 5741 | } |
5742 | if ((u32) (uintptr) memblock % DHD_SDALIGN) | 5742 | if ((u32)(unsigned long)memblock % DHD_SDALIGN) |
5743 | memptr += | 5743 | memptr += |
5744 | (DHD_SDALIGN - ((u32) (uintptr) memblock % DHD_SDALIGN)); | 5744 | (DHD_SDALIGN - ((u32)(unsigned long)memblock % DHD_SDALIGN)); |
5745 | 5745 | ||
5746 | /* Download image */ | 5746 | /* Download image */ |
5747 | while ((len = | 5747 | while ((len = |
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h index f90ecaea09ac..34eff08aaa67 100644 --- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h +++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h | |||
@@ -364,7 +364,7 @@ static inline struct wl_bss_info *next_bss(struct wl_scan_results *list, | |||
364 | struct wl_bss_info *bss) | 364 | struct wl_bss_info *bss) |
365 | { | 365 | { |
366 | return bss = bss ? | 366 | return bss = bss ? |
367 | (struct wl_bss_info *)((uintptr) bss + | 367 | (struct wl_bss_info *)((unsigned long)bss + |
368 | dtoh32(bss->length)) : list->bss_info; | 368 | dtoh32(bss->length)) : list->bss_info; |
369 | } | 369 | } |
370 | 370 | ||
diff --git a/drivers/staging/brcm80211/brcmfmac/wl_iw.c b/drivers/staging/brcm80211/brcmfmac/wl_iw.c index a198cf8c9390..d6196d5cd234 100644 --- a/drivers/staging/brcm80211/brcmfmac/wl_iw.c +++ b/drivers/staging/brcm80211/brcmfmac/wl_iw.c | |||
@@ -903,11 +903,11 @@ wl_iw_get_aplist(struct net_device *dev, | |||
903 | 903 | ||
904 | for (i = 0, dwrq->length = 0; | 904 | for (i = 0, dwrq->length = 0; |
905 | i < list->count && dwrq->length < IW_MAX_AP; i++) { | 905 | i < list->count && dwrq->length < IW_MAX_AP; i++) { |
906 | bi = bi ? (wl_bss_info_t *) ((uintptr) bi + | 906 | bi = bi ? (wl_bss_info_t *) ((unsigned long)bi + |
907 | dtoh32(bi->length)) : list-> | 907 | dtoh32(bi->length)) : list-> |
908 | bss_info; | 908 | bss_info; |
909 | ASSERT(((uintptr) bi + dtoh32(bi->length)) <= | 909 | ASSERT(((unsigned long)bi + dtoh32(bi->length)) <= |
910 | ((uintptr) list + buflen)); | 910 | ((unsigned long)list + buflen)); |
911 | 911 | ||
912 | if (!(dtoh16(bi->capability) & DOT11_CAP_ESS)) | 912 | if (!(dtoh16(bi->capability) & DOT11_CAP_ESS)) |
913 | continue; | 913 | continue; |
@@ -976,11 +976,11 @@ wl_iw_iscan_get_aplist(struct net_device *dev, | |||
976 | bi = NULL; | 976 | bi = NULL; |
977 | for (i = 0, dwrq->length = 0; | 977 | for (i = 0, dwrq->length = 0; |
978 | i < list->count && dwrq->length < IW_MAX_AP; i++) { | 978 | i < list->count && dwrq->length < IW_MAX_AP; i++) { |
979 | bi = bi ? (wl_bss_info_t *) ((uintptr) bi + | 979 | bi = bi ? (wl_bss_info_t *) ((unsigned long)bi + |
980 | dtoh32(bi->length)) : | 980 | dtoh32(bi->length)) : |
981 | list->bss_info; | 981 | list->bss_info; |
982 | ASSERT(((uintptr) bi + dtoh32(bi->length)) <= | 982 | ASSERT(((unsigned long)bi + dtoh32(bi->length)) <= |
983 | ((uintptr) list + WLC_IW_ISCAN_MAXLEN)); | 983 | ((unsigned long)list + WLC_IW_ISCAN_MAXLEN)); |
984 | 984 | ||
985 | if (!(dtoh16(bi->capability) & DOT11_CAP_ESS)) | 985 | if (!(dtoh16(bi->capability) & DOT11_CAP_ESS)) |
986 | continue; | 986 | continue; |
@@ -1508,7 +1508,7 @@ wl_iw_get_scan_prep(wl_scan_results_t *list, | |||
1508 | return ret; | 1508 | return ret; |
1509 | } | 1509 | } |
1510 | 1510 | ||
1511 | bi = bi ? (wl_bss_info_t *) ((uintptr) bi + | 1511 | bi = bi ? (wl_bss_info_t *)((unsigned long)bi + |
1512 | dtoh32(bi->length)) : list-> | 1512 | dtoh32(bi->length)) : list-> |
1513 | bss_info; | 1513 | bss_info; |
1514 | 1514 | ||
@@ -1568,7 +1568,7 @@ wl_iw_get_scan_prep(wl_scan_results_t *list, | |||
1568 | 1568 | ||
1569 | if (bi->rateset.count) { | 1569 | if (bi->rateset.count) { |
1570 | if (((event - extra) + | 1570 | if (((event - extra) + |
1571 | IW_EV_LCP_LEN) <= (uintptr) end) { | 1571 | IW_EV_LCP_LEN) <= (unsigned long)end) { |
1572 | value = event + IW_EV_LCP_LEN; | 1572 | value = event + IW_EV_LCP_LEN; |
1573 | iwe.cmd = SIOCGIWRATE; | 1573 | iwe.cmd = SIOCGIWRATE; |
1574 | iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = | 1574 | iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = |
@@ -1774,11 +1774,11 @@ wl_iw_iscan_get_scan(struct net_device *dev, | |||
1774 | bi = NULL; | 1774 | bi = NULL; |
1775 | for (ii = 0; ii < list->count && apcnt < IW_MAX_AP; | 1775 | for (ii = 0; ii < list->count && apcnt < IW_MAX_AP; |
1776 | apcnt++, ii++) { | 1776 | apcnt++, ii++) { |
1777 | bi = bi ? (wl_bss_info_t *) ((uintptr) bi + | 1777 | bi = bi ? (wl_bss_info_t *)((unsigned long)bi + |
1778 | dtoh32(bi->length)) : | 1778 | dtoh32(bi->length)) : |
1779 | list->bss_info; | 1779 | list->bss_info; |
1780 | ASSERT(((uintptr) bi + dtoh32(bi->length)) <= | 1780 | ASSERT(((unsigned long)bi + dtoh32(bi->length)) <= |
1781 | ((uintptr) list + WLC_IW_ISCAN_MAXLEN)); | 1781 | ((unsigned long)list + WLC_IW_ISCAN_MAXLEN)); |
1782 | 1782 | ||
1783 | if (event + ETHER_ADDR_LEN + bi->SSID_len + | 1783 | if (event + ETHER_ADDR_LEN + bi->SSID_len + |
1784 | IW_EV_UINT_LEN + IW_EV_FREQ_LEN + IW_EV_QUAL_LEN >= | 1784 | IW_EV_UINT_LEN + IW_EV_FREQ_LEN + IW_EV_QUAL_LEN >= |
diff --git a/drivers/staging/brcm80211/include/bcmutils.h b/drivers/staging/brcm80211/include/bcmutils.h index 4bff60edc089..8e4d7a490751 100644 --- a/drivers/staging/brcm80211/include/bcmutils.h +++ b/drivers/staging/brcm80211/include/bcmutils.h | |||
@@ -436,7 +436,7 @@ | |||
436 | #ifdef __i386__ | 436 | #ifdef __i386__ |
437 | 1 || | 437 | 1 || |
438 | #endif | 438 | #endif |
439 | (((uintptr) src1 | (uintptr) src2 | (uintptr) dst) & | 439 | (((unsigned long) src1 | (unsigned long) src2 | (unsigned long) dst) & |
440 | 3) == 0) { | 440 | 3) == 0) { |
441 | /* ARM CM3 rel time: 1229 (727 if alignment check could be omitted) */ | 441 | /* ARM CM3 rel time: 1229 (727 if alignment check could be omitted) */ |
442 | /* x86 supports unaligned. This version runs 6x-9x faster on x86. */ | 442 | /* x86 supports unaligned. This version runs 6x-9x faster on x86. */ |
diff --git a/drivers/staging/brcm80211/include/hnddma.h b/drivers/staging/brcm80211/include/hnddma.h index c268af61820d..bee4c89be23d 100644 --- a/drivers/staging/brcm80211/include/hnddma.h +++ b/drivers/staging/brcm80211/include/hnddma.h | |||
@@ -54,7 +54,7 @@ typedef void *(*di_rx_t) (hnddma_t *dmah); | |||
54 | typedef bool(*di_rxfill_t) (hnddma_t *dmah); | 54 | typedef bool(*di_rxfill_t) (hnddma_t *dmah); |
55 | typedef void (*di_txreclaim_t) (hnddma_t *dmah, txd_range_t range); | 55 | typedef void (*di_txreclaim_t) (hnddma_t *dmah, txd_range_t range); |
56 | typedef void (*di_rxreclaim_t) (hnddma_t *dmah); | 56 | typedef void (*di_rxreclaim_t) (hnddma_t *dmah); |
57 | typedef uintptr(*di_getvar_t) (hnddma_t *dmah, const char *name); | 57 | typedef unsigned long (*di_getvar_t) (hnddma_t *dmah, const char *name); |
58 | typedef void *(*di_getnexttxp_t) (hnddma_t *dmah, txd_range_t range); | 58 | typedef void *(*di_getnexttxp_t) (hnddma_t *dmah, txd_range_t range); |
59 | typedef void *(*di_getnextrxp_t) (hnddma_t *dmah, bool forceall); | 59 | typedef void *(*di_getnextrxp_t) (hnddma_t *dmah, bool forceall); |
60 | typedef void *(*di_peeknexttxp_t) (hnddma_t *dmah); | 60 | typedef void *(*di_peeknexttxp_t) (hnddma_t *dmah); |
diff --git a/drivers/staging/brcm80211/include/linux_osl.h b/drivers/staging/brcm80211/include/linux_osl.h index e9632c89b60d..7edf47f20a9e 100644 --- a/drivers/staging/brcm80211/include/linux_osl.h +++ b/drivers/staging/brcm80211/include/linux_osl.h | |||
@@ -131,8 +131,8 @@ extern void osl_dma_unmap(osl_t *osh, uint pa, uint size, int direction); | |||
131 | #ifdef BRCM_FULLMAC | 131 | #ifdef BRCM_FULLMAC |
132 | #include <bcmsdh.h> | 132 | #include <bcmsdh.h> |
133 | #endif | 133 | #endif |
134 | #define OSL_WRITE_REG(osh, r, v) (bcmsdh_reg_write(NULL, (uintptr)(r), sizeof(*(r)), (v))) | 134 | #define OSL_WRITE_REG(osh, r, v) (bcmsdh_reg_write(NULL, (unsigned long)(r), sizeof(*(r)), (v))) |
135 | #define OSL_READ_REG(osh, r) (bcmsdh_reg_read(NULL, (uintptr)(r), sizeof(*(r)))) | 135 | #define OSL_READ_REG(osh, r) (bcmsdh_reg_read(NULL, (unsigned long)(r), sizeof(*(r)))) |
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | #if defined(BCMSDIO) | 138 | #if defined(BCMSDIO) |
diff --git a/drivers/staging/brcm80211/include/siutils.h b/drivers/staging/brcm80211/include/siutils.h index f7b9483ee59d..57c36507a040 100644 --- a/drivers/staging/brcm80211/include/siutils.h +++ b/drivers/staging/brcm80211/include/siutils.h | |||
@@ -269,7 +269,7 @@ typedef struct si_info { | |||
269 | 269 | ||
270 | #define GOODCOREADDR(x, b) (((x) >= (b)) && ((x) < ((b) + SI_MAXCORES * SI_CORE_SIZE)) && \ | 270 | #define GOODCOREADDR(x, b) (((x) >= (b)) && ((x) < ((b) + SI_MAXCORES * SI_CORE_SIZE)) && \ |
271 | IS_ALIGNED((x), SI_CORE_SIZE)) | 271 | IS_ALIGNED((x), SI_CORE_SIZE)) |
272 | #define GOODREGS(regs) ((regs) != NULL && IS_ALIGNED((uintptr)(regs), SI_CORE_SIZE)) | 272 | #define GOODREGS(regs) ((regs) != NULL && IS_ALIGNED((unsigned long)(regs), SI_CORE_SIZE)) |
273 | #define BADCOREADDR 0 | 273 | #define BADCOREADDR 0 |
274 | #define GOODIDX(idx) (((uint)idx) < SI_MAXCORES) | 274 | #define GOODIDX(idx) (((uint)idx) < SI_MAXCORES) |
275 | #define NOREV -1 /* Invalid rev */ | 275 | #define NOREV -1 /* Invalid rev */ |
diff --git a/drivers/staging/brcm80211/include/typedefs.h b/drivers/staging/brcm80211/include/typedefs.h index 55fc41e1cfdb..266734a5ae98 100644 --- a/drivers/staging/brcm80211/include/typedefs.h +++ b/drivers/staging/brcm80211/include/typedefs.h | |||
@@ -19,17 +19,6 @@ | |||
19 | 19 | ||
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | 21 | ||
22 | #if defined(__x86_64__) | ||
23 | #define TYPEDEF_UINTPTR | ||
24 | typedef unsigned long long int uintptr; | ||
25 | #endif | ||
26 | |||
27 | #ifndef TYPEDEF_UINTPTR | ||
28 | typedef unsigned int uintptr; | ||
29 | #endif | ||
30 | |||
31 | #undef TYPEDEF_UINTPTR | ||
32 | |||
33 | #ifndef OFF | 22 | #ifndef OFF |
34 | #define OFF 0 | 23 | #define OFF 0 |
35 | #endif | 24 | #endif |
diff --git a/drivers/staging/brcm80211/sys/wlc_alloc.c b/drivers/staging/brcm80211/sys/wlc_alloc.c index 522f46310f61..f9953df851bb 100644 --- a/drivers/staging/brcm80211/sys/wlc_alloc.c +++ b/drivers/staging/brcm80211/sys/wlc_alloc.c | |||
@@ -206,7 +206,7 @@ wlc_info_t *wlc_attach_malloc(osl_t *osh, uint unit, uint *err, uint devid) | |||
206 | 206 | ||
207 | for (i = 1; i < MAXBANDS; i++) { | 207 | for (i = 1; i < MAXBANDS; i++) { |
208 | wlc->hw->bandstate[i] = (wlc_hwband_t *) | 208 | wlc->hw->bandstate[i] = (wlc_hwband_t *) |
209 | ((uintptr) wlc->hw->bandstate[0] + | 209 | ((unsigned long)wlc->hw->bandstate[0] + |
210 | (sizeof(wlc_hwband_t) * i)); | 210 | (sizeof(wlc_hwband_t) * i)); |
211 | } | 211 | } |
212 | } | 212 | } |
@@ -249,7 +249,7 @@ wlc_info_t *wlc_attach_malloc(osl_t *osh, uint unit, uint *err, uint devid) | |||
249 | int i; | 249 | int i; |
250 | for (i = 1; i < WLC_DEFAULT_KEYS; i++) { | 250 | for (i = 1; i < WLC_DEFAULT_KEYS; i++) { |
251 | wlc->wsec_def_keys[i] = (wsec_key_t *) | 251 | wlc->wsec_def_keys[i] = (wsec_key_t *) |
252 | ((uintptr) wlc->wsec_def_keys[0] + | 252 | ((unsigned long)wlc->wsec_def_keys[0] + |
253 | (sizeof(wsec_key_t) * i)); | 253 | (sizeof(wsec_key_t) * i)); |
254 | } | 254 | } |
255 | } | 255 | } |
@@ -277,7 +277,7 @@ wlc_info_t *wlc_attach_malloc(osl_t *osh, uint unit, uint *err, uint devid) | |||
277 | 277 | ||
278 | for (i = 1; i < MAXBANDS; i++) { | 278 | for (i = 1; i < MAXBANDS; i++) { |
279 | wlc->bandstate[i] = | 279 | wlc->bandstate[i] = |
280 | (wlcband_t *) ((uintptr) wlc->bandstate[0] + | 280 | (wlcband_t *) ((unsigned long)wlc->bandstate[0] + |
281 | (sizeof(wlcband_t) * i)); | 281 | (sizeof(wlcband_t) * i)); |
282 | } | 282 | } |
283 | } | 283 | } |
diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.c b/drivers/staging/brcm80211/sys/wlc_mac80211.c index 0f6497ae3ba0..e695a4839e98 100644 --- a/drivers/staging/brcm80211/sys/wlc_mac80211.c +++ b/drivers/staging/brcm80211/sys/wlc_mac80211.c | |||
@@ -3516,12 +3516,12 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) | |||
3516 | if (r->size == sizeof(u32)) | 3516 | if (r->size == sizeof(u32)) |
3517 | r->val = | 3517 | r->val = |
3518 | R_REG(osh, | 3518 | R_REG(osh, |
3519 | (u32 *) ((unsigned char *) (uintptr) regs + | 3519 | (u32 *)((unsigned char *)(unsigned long)regs + |
3520 | r->byteoff)); | 3520 | r->byteoff)); |
3521 | else if (r->size == sizeof(u16)) | 3521 | else if (r->size == sizeof(u16)) |
3522 | r->val = | 3522 | r->val = |
3523 | R_REG(osh, | 3523 | R_REG(osh, |
3524 | (u16 *) ((unsigned char *) (uintptr) regs + | 3524 | (u16 *)((unsigned char *)(unsigned long)regs + |
3525 | r->byteoff)); | 3525 | r->byteoff)); |
3526 | else | 3526 | else |
3527 | bcmerror = BCME_BADADDR; | 3527 | bcmerror = BCME_BADADDR; |
@@ -3551,11 +3551,11 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) | |||
3551 | } | 3551 | } |
3552 | if (r->size == sizeof(u32)) | 3552 | if (r->size == sizeof(u32)) |
3553 | W_REG(osh, | 3553 | W_REG(osh, |
3554 | (u32 *) ((unsigned char *) (uintptr) regs + | 3554 | (u32 *)((unsigned char *)(unsigned long) regs + |
3555 | r->byteoff), r->val); | 3555 | r->byteoff), r->val); |
3556 | else if (r->size == sizeof(u16)) | 3556 | else if (r->size == sizeof(u16)) |
3557 | W_REG(osh, | 3557 | W_REG(osh, |
3558 | (u16 *) ((unsigned char *) (uintptr) regs + | 3558 | (u16 *)((unsigned char *)(unsigned long) regs + |
3559 | r->byteoff), r->val); | 3559 | r->byteoff), r->val); |
3560 | else | 3560 | else |
3561 | bcmerror = BCME_BADADDR; | 3561 | bcmerror = BCME_BADADDR; |
@@ -4607,7 +4607,7 @@ wlc_iovar_op(wlc_info_t *wlc, const char *name, | |||
4607 | ASSERT(!set || (!params && !p_len)); | 4607 | ASSERT(!set || (!params && !p_len)); |
4608 | 4608 | ||
4609 | if (!set && (len == sizeof(int)) && | 4609 | if (!set && (len == sizeof(int)) && |
4610 | !(IS_ALIGNED((uintptr) (arg), (uint) sizeof(int)))) { | 4610 | !(IS_ALIGNED((unsigned long)(arg), (uint) sizeof(int)))) { |
4611 | WL_ERROR(("wl%d: %s unaligned get ptr for %s\n", | 4611 | WL_ERROR(("wl%d: %s unaligned get ptr for %s\n", |
4612 | wlc->pub->unit, __func__, name)); | 4612 | wlc->pub->unit, __func__, name)); |
4613 | ASSERT(0); | 4613 | ASSERT(0); |
@@ -4755,7 +4755,7 @@ wlc_doiovar(void *hdl, const bcm_iovar_t *vi, u32 actionid, | |||
4755 | bcopy(params, &int_val, sizeof(int_val)); | 4755 | bcopy(params, &int_val, sizeof(int_val)); |
4756 | 4756 | ||
4757 | if (p_len >= (int)sizeof(int_val) * 2) | 4757 | if (p_len >= (int)sizeof(int_val) * 2) |
4758 | bcopy((void *)((uintptr) params + sizeof(int_val)), &int_val2, | 4758 | bcopy((void *)((unsigned long)params + sizeof(int_val)), &int_val2, |
4759 | sizeof(int_val)); | 4759 | sizeof(int_val)); |
4760 | 4760 | ||
4761 | /* convenience int ptr for 4-byte gets (requires int aligned arg) */ | 4761 | /* convenience int ptr for 4-byte gets (requires int aligned arg) */ |
@@ -6318,7 +6318,7 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, | |||
6318 | } | 6318 | } |
6319 | 6319 | ||
6320 | /* RTS PLCP header */ | 6320 | /* RTS PLCP header */ |
6321 | ASSERT(IS_ALIGNED((uintptr) txh->RTSPhyHeader, sizeof(u16))); | 6321 | ASSERT(IS_ALIGNED((unsigned long)txh->RTSPhyHeader, sizeof(u16))); |
6322 | rts_plcp = txh->RTSPhyHeader; | 6322 | rts_plcp = txh->RTSPhyHeader; |
6323 | if (use_cts) | 6323 | if (use_cts) |
6324 | rts_phylen = DOT11_CTS_LEN + DOT11_FCS_LEN; | 6324 | rts_phylen = DOT11_CTS_LEN + DOT11_FCS_LEN; |
@@ -7164,7 +7164,7 @@ wlc_recvctl(wlc_info_t *wlc, osl_t *osh, d11rxhdr_t *rxh, void *p) | |||
7164 | ASSERT(!PKTNEXT(p)); | 7164 | ASSERT(!PKTNEXT(p)); |
7165 | ASSERT(!PKTLINK(p)); | 7165 | ASSERT(!PKTLINK(p)); |
7166 | 7166 | ||
7167 | ASSERT(IS_ALIGNED((uintptr) skb->data, 2)); | 7167 | ASSERT(IS_ALIGNED((unsigned long)skb->data, 2)); |
7168 | 7168 | ||
7169 | memcpy(IEEE80211_SKB_RXCB(p), &rx_status, sizeof(rx_status)); | 7169 | memcpy(IEEE80211_SKB_RXCB(p), &rx_status, sizeof(rx_status)); |
7170 | ieee80211_rx_irqsafe(wlc->pub->ieee_hw, p); | 7170 | ieee80211_rx_irqsafe(wlc->pub->ieee_hw, p); |
diff --git a/drivers/staging/brcm80211/sys/wlc_rpc.h b/drivers/staging/brcm80211/sys/wlc_rpc.h index c98605c2d75e..db39645ccbdc 100644 --- a/drivers/staging/brcm80211/sys/wlc_rpc.h +++ b/drivers/staging/brcm80211/sys/wlc_rpc.h | |||
@@ -448,7 +448,7 @@ wlc_rpc_id_get(struct rpc_info *rpc, rpc_buf_t *buf) | |||
448 | bcm_xdr_buf_init(&b, bcm_rpc_buf_data(bcm_rpc_tp_get(rpc), buf), | 448 | bcm_xdr_buf_init(&b, bcm_rpc_buf_data(bcm_rpc_tp_get(rpc), buf), |
449 | sizeof(u32)); | 449 | sizeof(u32)); |
450 | 450 | ||
451 | bcm_xdr_unpack_u32(&b, (u32 *) ((uintptr) & rpc_id)); | 451 | bcm_xdr_unpack_u32(&b, (u32 *)((unsigned long) & rpc_id)); |
452 | return rpc_id; | 452 | return rpc_id; |
453 | } | 453 | } |
454 | #endif | 454 | #endif |
diff --git a/drivers/staging/brcm80211/util/aiutils.c b/drivers/staging/brcm80211/util/aiutils.c index 512f4127ab9a..65461d0d91da 100644 --- a/drivers/staging/brcm80211/util/aiutils.c +++ b/drivers/staging/brcm80211/util/aiutils.c | |||
@@ -123,7 +123,7 @@ void ai_scan(si_t *sih, void *regs, uint devid) | |||
123 | 123 | ||
124 | case PCI_BUS: | 124 | case PCI_BUS: |
125 | /* Set wrappers address */ | 125 | /* Set wrappers address */ |
126 | sii->curwrap = (void *)((uintptr) regs + SI_CORE_SIZE); | 126 | sii->curwrap = (void *)((unsigned long)regs + SI_CORE_SIZE); |
127 | 127 | ||
128 | /* Now point the window at the erom */ | 128 | /* Now point the window at the erom */ |
129 | OSL_PCI_WRITE_CONFIG(sii->osh, PCI_BAR0_WIN, 4, erombase); | 129 | OSL_PCI_WRITE_CONFIG(sii->osh, PCI_BAR0_WIN, 4, erombase); |
diff --git a/drivers/staging/brcm80211/util/bcmutils.c b/drivers/staging/brcm80211/util/bcmutils.c index c4c0136526c0..5635e8698acc 100644 --- a/drivers/staging/brcm80211/util/bcmutils.c +++ b/drivers/staging/brcm80211/util/bcmutils.c | |||
@@ -432,7 +432,7 @@ uint pktsetprio(void *pkt, bool update_vtag) | |||
432 | int rc = 0; | 432 | int rc = 0; |
433 | 433 | ||
434 | pktdata = (u8 *) PKTDATA(pkt); | 434 | pktdata = (u8 *) PKTDATA(pkt); |
435 | ASSERT(IS_ALIGNED((uintptr) pktdata, sizeof(u16))); | 435 | ASSERT(IS_ALIGNED((unsigned long)pktdata, sizeof(u16))); |
436 | 436 | ||
437 | eh = (struct ether_header *)pktdata; | 437 | eh = (struct ether_header *)pktdata; |
438 | 438 | ||
diff --git a/drivers/staging/brcm80211/util/hnddma.c b/drivers/staging/brcm80211/util/hnddma.c index 8526a4e6750f..3edef39962a7 100644 --- a/drivers/staging/brcm80211/util/hnddma.c +++ b/drivers/staging/brcm80211/util/hnddma.c | |||
@@ -218,7 +218,7 @@ static uint _dma_txcommitted(dma_info_t *di); | |||
218 | 218 | ||
219 | static void *_dma_peeknexttxp(dma_info_t *di); | 219 | static void *_dma_peeknexttxp(dma_info_t *di); |
220 | static void *_dma_peeknextrxp(dma_info_t *di); | 220 | static void *_dma_peeknextrxp(dma_info_t *di); |
221 | static uintptr _dma_getvar(dma_info_t *di, const char *name); | 221 | static unsigned long _dma_getvar(dma_info_t *di, const char *name); |
222 | static void _dma_counterreset(dma_info_t *di); | 222 | static void _dma_counterreset(dma_info_t *di); |
223 | static void _dma_fifoloopbackenable(dma_info_t *di); | 223 | static void _dma_fifoloopbackenable(dma_info_t *di); |
224 | static uint _dma_ctrlflags(dma_info_t *di, uint mask, uint flags); | 224 | static uint _dma_ctrlflags(dma_info_t *di, uint mask, uint flags); |
@@ -1363,10 +1363,10 @@ static uint _dma_ctrlflags(dma_info_t *di, uint mask, uint flags) | |||
1363 | } | 1363 | } |
1364 | 1364 | ||
1365 | /* get the address of the var in order to change later */ | 1365 | /* get the address of the var in order to change later */ |
1366 | static uintptr _dma_getvar(dma_info_t *di, const char *name) | 1366 | static unsigned long _dma_getvar(dma_info_t *di, const char *name) |
1367 | { | 1367 | { |
1368 | if (!strcmp(name, "&txavail")) | 1368 | if (!strcmp(name, "&txavail")) |
1369 | return (uintptr) &(di->hnddma.txavail); | 1369 | return (unsigned long)&(di->hnddma.txavail); |
1370 | else { | 1370 | else { |
1371 | ASSERT(0); | 1371 | ASSERT(0); |
1372 | } | 1372 | } |
@@ -1409,7 +1409,7 @@ static void *dma_ringalloc(osl_t *osh, u32 boundary, uint size, | |||
1409 | if (NULL == va) | 1409 | if (NULL == va) |
1410 | return NULL; | 1410 | return NULL; |
1411 | 1411 | ||
1412 | desc_strtaddr = (u32) roundup((uintptr) va, alignbytes); | 1412 | desc_strtaddr = (u32) roundup((unsigned long)va, alignbytes); |
1413 | if (((desc_strtaddr + size - 1) & boundary) != (desc_strtaddr | 1413 | if (((desc_strtaddr + size - 1) & boundary) != (desc_strtaddr |
1414 | & boundary)) { | 1414 | & boundary)) { |
1415 | *alignbits = dma_align_sizetobits(size); | 1415 | *alignbits = dma_align_sizetobits(size); |
@@ -1534,7 +1534,7 @@ static bool dma32_alloc(dma_info_t *di, uint direction) | |||
1534 | 1534 | ||
1535 | PHYSADDRHISET(di->txdpa, 0); | 1535 | PHYSADDRHISET(di->txdpa, 0); |
1536 | ASSERT(PHYSADDRHI(di->txdpaorig) == 0); | 1536 | ASSERT(PHYSADDRHI(di->txdpaorig) == 0); |
1537 | di->txd32 = (dma32dd_t *) roundup((uintptr) va, align); | 1537 | di->txd32 = (dma32dd_t *) roundup((unsigned long)va, align); |
1538 | di->txdalign = | 1538 | di->txdalign = |
1539 | (uint) ((s8 *)di->txd32 - (s8 *) va); | 1539 | (uint) ((s8 *)di->txd32 - (s8 *) va); |
1540 | 1540 | ||
@@ -1544,7 +1544,7 @@ static bool dma32_alloc(dma_info_t *di, uint direction) | |||
1544 | ASSERT(PHYSADDRLO(di->txdpa) >= PHYSADDRLO(di->txdpaorig)); | 1544 | ASSERT(PHYSADDRLO(di->txdpa) >= PHYSADDRLO(di->txdpaorig)); |
1545 | 1545 | ||
1546 | di->txdalloc = alloced; | 1546 | di->txdalloc = alloced; |
1547 | ASSERT(IS_ALIGNED((uintptr) di->txd32, align)); | 1547 | ASSERT(IS_ALIGNED((unsigned long)di->txd32, align)); |
1548 | } else { | 1548 | } else { |
1549 | va = dma_ringalloc(di->osh, D32RINGALIGN, size, &align_bits, | 1549 | va = dma_ringalloc(di->osh, D32RINGALIGN, size, &align_bits, |
1550 | &alloced, &di->rxdpaorig, &di->rx_dmah); | 1550 | &alloced, &di->rxdpaorig, &di->rx_dmah); |
@@ -1555,7 +1555,7 @@ static bool dma32_alloc(dma_info_t *di, uint direction) | |||
1555 | 1555 | ||
1556 | PHYSADDRHISET(di->rxdpa, 0); | 1556 | PHYSADDRHISET(di->rxdpa, 0); |
1557 | ASSERT(PHYSADDRHI(di->rxdpaorig) == 0); | 1557 | ASSERT(PHYSADDRHI(di->rxdpaorig) == 0); |
1558 | di->rxd32 = (dma32dd_t *) roundup((uintptr) va, align); | 1558 | di->rxd32 = (dma32dd_t *) roundup((unsigned long)va, align); |
1559 | di->rxdalign = | 1559 | di->rxdalign = |
1560 | (uint) ((s8 *)di->rxd32 - (s8 *) va); | 1560 | (uint) ((s8 *)di->rxd32 - (s8 *) va); |
1561 | 1561 | ||
@@ -1564,7 +1564,7 @@ static bool dma32_alloc(dma_info_t *di, uint direction) | |||
1564 | /* Make sure that alignment didn't overflow */ | 1564 | /* Make sure that alignment didn't overflow */ |
1565 | ASSERT(PHYSADDRLO(di->rxdpa) >= PHYSADDRLO(di->rxdpaorig)); | 1565 | ASSERT(PHYSADDRLO(di->rxdpa) >= PHYSADDRLO(di->rxdpaorig)); |
1566 | di->rxdalloc = alloced; | 1566 | di->rxdalloc = alloced; |
1567 | ASSERT(IS_ALIGNED((uintptr) di->rxd32, align)); | 1567 | ASSERT(IS_ALIGNED((unsigned long)di->rxd32, align)); |
1568 | } | 1568 | } |
1569 | 1569 | ||
1570 | return true; | 1570 | return true; |
@@ -2100,7 +2100,7 @@ static bool dma64_alloc(dma_info_t *di, uint direction) | |||
2100 | return false; | 2100 | return false; |
2101 | } | 2101 | } |
2102 | align = (1 << align_bits); | 2102 | align = (1 << align_bits); |
2103 | di->txd64 = (dma64dd_t *) roundup((uintptr) va, align); | 2103 | di->txd64 = (dma64dd_t *) roundup((unsigned long)va, align); |
2104 | di->txdalign = (uint) ((s8 *)di->txd64 - (s8 *) va); | 2104 | di->txdalign = (uint) ((s8 *)di->txd64 - (s8 *) va); |
2105 | PHYSADDRLOSET(di->txdpa, | 2105 | PHYSADDRLOSET(di->txdpa, |
2106 | PHYSADDRLO(di->txdpaorig) + di->txdalign); | 2106 | PHYSADDRLO(di->txdpaorig) + di->txdalign); |
@@ -2109,7 +2109,7 @@ static bool dma64_alloc(dma_info_t *di, uint direction) | |||
2109 | 2109 | ||
2110 | PHYSADDRHISET(di->txdpa, PHYSADDRHI(di->txdpaorig)); | 2110 | PHYSADDRHISET(di->txdpa, PHYSADDRHI(di->txdpaorig)); |
2111 | di->txdalloc = alloced; | 2111 | di->txdalloc = alloced; |
2112 | ASSERT(IS_ALIGNED((uintptr) di->txd64, align)); | 2112 | ASSERT(IS_ALIGNED((unsigned long)di->txd64, align)); |
2113 | } else { | 2113 | } else { |
2114 | va = dma_ringalloc(di->osh, D64RINGALIGN, size, &align_bits, | 2114 | va = dma_ringalloc(di->osh, D64RINGALIGN, size, &align_bits, |
2115 | &alloced, &di->rxdpaorig, &di->rx_dmah); | 2115 | &alloced, &di->rxdpaorig, &di->rx_dmah); |
@@ -2118,7 +2118,7 @@ static bool dma64_alloc(dma_info_t *di, uint direction) | |||
2118 | return false; | 2118 | return false; |
2119 | } | 2119 | } |
2120 | align = (1 << align_bits); | 2120 | align = (1 << align_bits); |
2121 | di->rxd64 = (dma64dd_t *) roundup((uintptr) va, align); | 2121 | di->rxd64 = (dma64dd_t *) roundup((unsigned long)va, align); |
2122 | di->rxdalign = (uint) ((s8 *)di->rxd64 - (s8 *) va); | 2122 | di->rxdalign = (uint) ((s8 *)di->rxd64 - (s8 *) va); |
2123 | PHYSADDRLOSET(di->rxdpa, | 2123 | PHYSADDRLOSET(di->rxdpa, |
2124 | PHYSADDRLO(di->rxdpaorig) + di->rxdalign); | 2124 | PHYSADDRLO(di->rxdpaorig) + di->rxdalign); |
@@ -2127,7 +2127,7 @@ static bool dma64_alloc(dma_info_t *di, uint direction) | |||
2127 | 2127 | ||
2128 | PHYSADDRHISET(di->rxdpa, PHYSADDRHI(di->rxdpaorig)); | 2128 | PHYSADDRHISET(di->rxdpa, PHYSADDRHI(di->rxdpaorig)); |
2129 | di->rxdalloc = alloced; | 2129 | di->rxdalloc = alloced; |
2130 | ASSERT(IS_ALIGNED((uintptr) di->rxd64, align)); | 2130 | ASSERT(IS_ALIGNED((unsigned long)di->rxd64, align)); |
2131 | } | 2131 | } |
2132 | 2132 | ||
2133 | return true; | 2133 | return true; |
diff --git a/drivers/staging/brcm80211/util/sbutils.c b/drivers/staging/brcm80211/util/sbutils.c index 7b07513f0daf..ca49a805c996 100644 --- a/drivers/staging/brcm80211/util/sbutils.c +++ b/drivers/staging/brcm80211/util/sbutils.c | |||
@@ -90,7 +90,7 @@ static u32 _sb_coresba(si_info_t *sii) | |||
90 | switch (BUSTYPE(sii->pub.bustype)) { | 90 | switch (BUSTYPE(sii->pub.bustype)) { |
91 | case SPI_BUS: | 91 | case SPI_BUS: |
92 | case SDIO_BUS: | 92 | case SDIO_BUS: |
93 | sbaddr = (u32) (uintptr) sii->curmap; | 93 | sbaddr = (u32)(unsigned long)sii->curmap; |
94 | break; | 94 | break; |
95 | default: | 95 | default: |
96 | ASSERT(0); | 96 | ASSERT(0); |