diff options
author | peter <peter@FreeBSD.org> | 2004-12-15 02:25:21 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2004-12-15 02:25:21 +0000 |
commit | adbd450602d8c30f87ea57df2d67b2a8920e0596 (patch) | |
tree | fae3164ca4b730ed4f4494eabbde0e9307e61575 | |
parent | d9ed7c7f5e9de290274990d3bf3f2aa6bd162bc4 (diff) | |
download | FreeBSD-src-adbd450602d8c30f87ea57df2d67b2a8920e0596.zip FreeBSD-src-adbd450602d8c30f87ea57df2d67b2a8920e0596.tar.gz |
Make this amd64-clean. sizeof is long on amd64, so things that do a printf
of a sizeof, need to use %z to get the correct type on all our platforms.
Also, convert integers<->pointers via uintptr_t.
(I think Sam's instructions were for me to commit this. If I
misunderstood, then I apologize in advance.)
-rw-r--r-- | sys/dev/ath/ath_rate/onoe/onoe.c | 2 | ||||
-rw-r--r-- | sys/dev/ath/if_ath.c | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/ath/ath_rate/onoe/onoe.c b/sys/dev/ath/ath_rate/onoe/onoe.c index 5f1c71a..b21ff07 100644 --- a/sys/dev/ath/ath_rate/onoe/onoe.c +++ b/sys/dev/ath/ath_rate/onoe/onoe.c @@ -310,7 +310,7 @@ ath_rate_ctl_start(struct ath_softc *sc, struct ieee80211_node *ni) static void ath_rate_cb(void *arg, struct ieee80211_node *ni) { - ath_rate_update(ni->ni_ic->ic_ifp->if_softc, ni, (int) arg); + ath_rate_update(ni->ni_ic->ic_ifp->if_softc, ni, (int)(uintptr_t) arg); } /* diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index e2bd2aa..31598fa 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -294,7 +294,8 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) */ sc->sc_keymax = ath_hal_keycachesize(ah); if (sc->sc_keymax > sizeof(sc->sc_keymap) * NBBY) { - if_printf(ifp, "Warning, using only %u of %u key cache slots\n", + if_printf(ifp, + "Warning, using only %zu of %u key cache slots\n", sizeof(sc->sc_keymap) * NBBY, sc->sc_keymax); sc->sc_keymax = sizeof(sc->sc_keymap) * NBBY; } @@ -2772,7 +2773,8 @@ ath_txq_setup(struct ath_softc *sc, int qtype, int subtype) return NULL; } if (qnum >= N(sc->sc_txq)) { - device_printf(sc->sc_dev, "hal qnum %u out of range, max %u!\n", + device_printf(sc->sc_dev, + "hal qnum %u out of range, max %zu!\n", qnum, N(sc->sc_txq)); ath_hal_releasetxqueue(ah, qnum); return NULL; @@ -2808,7 +2810,7 @@ ath_tx_setup(struct ath_softc *sc, int ac, int haltype) struct ath_txq *txq; if (ac >= N(sc->sc_ac2q)) { - device_printf(sc->sc_dev, "AC %u out of range, max %u!\n", + device_printf(sc->sc_dev, "AC %u out of range, max %zu!\n", ac, N(sc->sc_ac2q)); return 0; } @@ -3578,7 +3580,8 @@ ath_tx_stopdma(struct ath_softc *sc, struct ath_txq *txq) (void) ath_hal_stoptxdma(ah, txq->axq_qnum); DPRINTF(sc, ATH_DEBUG_RESET, "%s: tx queue [%u] %p, link %p\n", __func__, txq->axq_qnum, - (caddr_t) ath_hal_gettxbuf(ah, txq->axq_qnum), txq->axq_link); + (caddr_t)(uintptr_t) ath_hal_gettxbuf(ah, txq->axq_qnum), + txq->axq_link); } /* |