mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
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.)
This commit is contained in:
parent
1556fbfc99
commit
6891c875c2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138878
@ -310,7 +310,7 @@ ath_rate_ctl_start(struct ath_softc *sc, struct ieee80211_node *ni)
|
|||||||
static void
|
static void
|
||||||
ath_rate_cb(void *arg, struct ieee80211_node *ni)
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -294,7 +294,8 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
|
|||||||
*/
|
*/
|
||||||
sc->sc_keymax = ath_hal_keycachesize(ah);
|
sc->sc_keymax = ath_hal_keycachesize(ah);
|
||||||
if (sc->sc_keymax > sizeof(sc->sc_keymap) * NBBY) {
|
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);
|
sizeof(sc->sc_keymap) * NBBY, sc->sc_keymax);
|
||||||
sc->sc_keymax = sizeof(sc->sc_keymap) * NBBY;
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (qnum >= N(sc->sc_txq)) {
|
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));
|
qnum, N(sc->sc_txq));
|
||||||
ath_hal_releasetxqueue(ah, qnum);
|
ath_hal_releasetxqueue(ah, qnum);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -2808,7 +2810,7 @@ ath_tx_setup(struct ath_softc *sc, int ac, int haltype)
|
|||||||
struct ath_txq *txq;
|
struct ath_txq *txq;
|
||||||
|
|
||||||
if (ac >= N(sc->sc_ac2q)) {
|
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));
|
ac, N(sc->sc_ac2q));
|
||||||
return 0;
|
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);
|
(void) ath_hal_stoptxdma(ah, txq->axq_qnum);
|
||||||
DPRINTF(sc, ATH_DEBUG_RESET, "%s: tx queue [%u] %p, link %p\n",
|
DPRINTF(sc, ATH_DEBUG_RESET, "%s: tx queue [%u] %p, link %p\n",
|
||||||
__func__, txq->axq_qnum,
|
__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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user