Use void* to keep an address, not u_int32_t
authorproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 21 Nov 2007 22:44:32 +0000 (22:44 +0000)
committerproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 21 Nov 2007 22:44:32 +0000 (22:44 +0000)
Pointers don't fit u_int32_t on 64-bit systems.  Besides, conversion
from pointers to integers and vice versa should be generally avoided.

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2906 0192ed92-7a03-0410-a25b-9323aeb14dbd

ath/if_ath.c

index 61633afbe1c02fb4404c8703296af125070a76dd..76b7318e3b3d103ccbe0a6634d5d23afa64973e2 100644 (file)
@@ -11468,10 +11468,11 @@ ath_return_txbuf_locked_debug(struct ath_softc *sc, struct ath_buf **buf, const
 ath_return_txbuf_locked(struct ath_softc *sc, struct ath_buf **buf) 
 #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
 {
-       u_int32_t bufaddr = 0;
+       void *bufaddr;
+
        if ((buf == NULL) || ((*buf) == NULL)) 
                return;
-       bufaddr = (u_int32_t)*buf;
+       bufaddr = (void *)*buf;
 #ifdef IEEE80211_DEBUG_REFCNT
        cleanup_ath_buf_debug(sc, (*buf), BUS_DMA_TODEVICE, func, line);
 #else
@@ -11483,8 +11484,7 @@ ath_return_txbuf_locked(struct ath_softc *sc, struct ath_buf **buf)
        DPRINTF(sc, ATH_DEBUG_TXBUF, 
                "[TXBUF=%03d/%03d] %s:%d -> %s:%d returned txbuf %p.\n", 
                ath_get_buffer_count(), ATH_TXBUF,
-               func, line, __func__, __LINE__,
-               (void*)bufaddr);
+               func, line, __func__, __LINE__, bufaddr);
 #endif /* #ifdef IEEE80211_DEBUG_REFCNT */
        if (sc->sc_devstopped) {
                ++sc->sc_reapcount;