diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-21 10:50:21 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-21 10:50:21 -0700 |
commit | f024c48a77c3c20d99de8f3424e8d3a061896885 (patch) | |
tree | 500bbcb1d1dc6d0e8f5872877b1f88fd090eb901 /drivers/staging/brcm80211/sys | |
parent | 8ee48db6be4d6634d3ade242470381040d4b8e21 (diff) | |
download | op-kernel-dev-f024c48a77c3c20d99de8f3424e8d3a061896885.zip op-kernel-dev-f024c48a77c3c20d99de8f3424e8d3a061896885.tar.gz |
Staging: brcm80211: remove uintptr typedef usage
Use a unsigned long, that is the proper type for this type of thing on
Linux.
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/sys')
-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 |
3 files changed, 12 insertions, 12 deletions
diff --git a/drivers/staging/brcm80211/sys/wlc_alloc.c b/drivers/staging/brcm80211/sys/wlc_alloc.c index 522f463..f9953df 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) for (i = 1; i < MAXBANDS; i++) { wlc->hw->bandstate[i] = (wlc_hwband_t *) - ((uintptr) wlc->hw->bandstate[0] + + ((unsigned long)wlc->hw->bandstate[0] + (sizeof(wlc_hwband_t) * i)); } } @@ -249,7 +249,7 @@ wlc_info_t *wlc_attach_malloc(osl_t *osh, uint unit, uint *err, uint devid) int i; for (i = 1; i < WLC_DEFAULT_KEYS; i++) { wlc->wsec_def_keys[i] = (wsec_key_t *) - ((uintptr) wlc->wsec_def_keys[0] + + ((unsigned long)wlc->wsec_def_keys[0] + (sizeof(wsec_key_t) * i)); } } @@ -277,7 +277,7 @@ wlc_info_t *wlc_attach_malloc(osl_t *osh, uint unit, uint *err, uint devid) for (i = 1; i < MAXBANDS; i++) { wlc->bandstate[i] = - (wlcband_t *) ((uintptr) wlc->bandstate[0] + + (wlcband_t *) ((unsigned long)wlc->bandstate[0] + (sizeof(wlcband_t) * i)); } } diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.c b/drivers/staging/brcm80211/sys/wlc_mac80211.c index 0f6497a..e695a48 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) if (r->size == sizeof(u32)) r->val = R_REG(osh, - (u32 *) ((unsigned char *) (uintptr) regs + + (u32 *)((unsigned char *)(unsigned long)regs + r->byteoff)); else if (r->size == sizeof(u16)) r->val = R_REG(osh, - (u16 *) ((unsigned char *) (uintptr) regs + + (u16 *)((unsigned char *)(unsigned long)regs + r->byteoff)); else bcmerror = BCME_BADADDR; @@ -3551,11 +3551,11 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) } if (r->size == sizeof(u32)) W_REG(osh, - (u32 *) ((unsigned char *) (uintptr) regs + + (u32 *)((unsigned char *)(unsigned long) regs + r->byteoff), r->val); else if (r->size == sizeof(u16)) W_REG(osh, - (u16 *) ((unsigned char *) (uintptr) regs + + (u16 *)((unsigned char *)(unsigned long) regs + r->byteoff), r->val); else bcmerror = BCME_BADADDR; @@ -4607,7 +4607,7 @@ wlc_iovar_op(wlc_info_t *wlc, const char *name, ASSERT(!set || (!params && !p_len)); if (!set && (len == sizeof(int)) && - !(IS_ALIGNED((uintptr) (arg), (uint) sizeof(int)))) { + !(IS_ALIGNED((unsigned long)(arg), (uint) sizeof(int)))) { WL_ERROR(("wl%d: %s unaligned get ptr for %s\n", wlc->pub->unit, __func__, name)); ASSERT(0); @@ -4755,7 +4755,7 @@ wlc_doiovar(void *hdl, const bcm_iovar_t *vi, u32 actionid, bcopy(params, &int_val, sizeof(int_val)); if (p_len >= (int)sizeof(int_val) * 2) - bcopy((void *)((uintptr) params + sizeof(int_val)), &int_val2, + bcopy((void *)((unsigned long)params + sizeof(int_val)), &int_val2, sizeof(int_val)); /* 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, } /* RTS PLCP header */ - ASSERT(IS_ALIGNED((uintptr) txh->RTSPhyHeader, sizeof(u16))); + ASSERT(IS_ALIGNED((unsigned long)txh->RTSPhyHeader, sizeof(u16))); rts_plcp = txh->RTSPhyHeader; if (use_cts) 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) ASSERT(!PKTNEXT(p)); ASSERT(!PKTLINK(p)); - ASSERT(IS_ALIGNED((uintptr) skb->data, 2)); + ASSERT(IS_ALIGNED((unsigned long)skb->data, 2)); memcpy(IEEE80211_SKB_RXCB(p), &rx_status, sizeof(rx_status)); 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 c98605c..db39645 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) bcm_xdr_buf_init(&b, bcm_rpc_buf_data(bcm_rpc_tp_get(rpc), buf), sizeof(u32)); - bcm_xdr_unpack_u32(&b, (u32 *) ((uintptr) & rpc_id)); + bcm_xdr_unpack_u32(&b, (u32 *)((unsigned long) & rpc_id)); return rpc_id; } #endif |