diff options
| author | 2017-03-13 01:10:03 +0000 | |
|---|---|---|
| committer | 2017-03-13 01:10:03 +0000 | |
| commit | df6ab4a249b17bdf4cf236e1771a6fe5d657e5ac (patch) | |
| tree | 2a1cc841b0df4c22682da54077ddecffb5a8e470 | |
| parent | Fixup format string and type issues found by cppcheck (diff) | |
| download | wireguard-openbsd-df6ab4a249b17bdf4cf236e1771a6fe5d657e5ac.tar.xz wireguard-openbsd-df6ab4a249b17bdf4cf236e1771a6fe5d657e5ac.zip | |
Fixup format strings in debug messages found by cppcheck
| -rw-r--r-- | sys/dev/pv/if_hvn.c | 12 | ||||
| -rw-r--r-- | sys/dev/pv/if_xnf.c | 4 | ||||
| -rw-r--r-- | sys/dev/pv/xbf.c | 16 | ||||
| -rw-r--r-- | sys/dev/pv/xenstore.c | 4 |
4 files changed, 18 insertions, 18 deletions
diff --git a/sys/dev/pv/if_hvn.c b/sys/dev/pv/if_hvn.c index 85548ff00b0..674a3d680b7 100644 --- a/sys/dev/pv/if_hvn.c +++ b/sys/dev/pv/if_hvn.c @@ -680,7 +680,7 @@ hvn_rx_ring_create(struct hvn_softc *sc) goto errout; } if (rsp->nvs_nsect > 1) { - DPRINTF("%s: invalid number of Rx ring sections: %d\n", + DPRINTF("%s: invalid number of Rx ring sections: %u\n", sc->sc_dev.dv_xname, rsp->nvs_nsect); hvn_rx_ring_destroy(sc); return (-1); @@ -1030,7 +1030,7 @@ hvn_nvs_cmd(struct hvn_softc *sc, void *cmd, size_t cmdsize, uint64_t tid, else delay(100); } else if (rv) { - DPRINTF("%s: NVSP operation %d send error %d\n", + DPRINTF("%s: NVSP operation %u send error %d\n", sc->sc_dev.dv_xname, hdr->nvs_type, rv); return (rv); } @@ -1236,7 +1236,7 @@ hvn_rndis_attach(struct hvn_softc *sc) BUS_DMASYNC_PREWRITE); if ((rv = hvn_rndis_cmd(sc, rc, 500)) != 0) { - DPRINTF("%s: INITIALIZE_MSG failed, error %u\n", + DPRINTF("%s: INITIALIZE_MSG failed, error %d\n", sc->sc_dev.dv_xname, rv); hvn_free_cmd(sc, rc); goto errout; @@ -1327,7 +1327,7 @@ hvn_rndis_cmd(struct hvn_softc *sc, struct rndis_cmd *rc, int timo) if (rv == EAGAIN) tsleep(rc, PRIBIO, "rndisout", timo / 10); else if (rv) { - DPRINTF("%s: RNDIS operation %d send error %d\n", + DPRINTF("%s: RNDIS operation %u send error %d\n", sc->sc_dev.dv_xname, hdr->rm_type, rv); hvn_rollback_cmd(sc, rc); return (rv); @@ -1673,7 +1673,7 @@ hvn_rndis_set(struct hvn_softc *sc, uint32_t oid, void *data, size_t length) BUS_DMASYNC_PREWRITE); if ((rv = hvn_rndis_cmd(sc, rc, 500)) != 0) { - DPRINTF("%s: SET_MSG failed, error %u\n", + DPRINTF("%s: SET_MSG failed, error %d\n", sc->sc_dev.dv_xname, rv); hvn_free_cmd(sc, rc); return (rv); @@ -1746,7 +1746,7 @@ hvn_rndis_detach(struct hvn_softc *sc) BUS_DMASYNC_PREWRITE); if ((rv = hvn_rndis_cmd(sc, rc, 500)) != 0) - DPRINTF("%s: HALT_MSG failed, error %u\n", + DPRINTF("%s: HALT_MSG failed, error %d\n", sc->sc_dev.dv_xname, rv); hvn_free_cmd(sc, rc); diff --git a/sys/dev/pv/if_xnf.c b/sys/dev/pv/if_xnf.c index fa8473bc651..1cdc1b297e8 100644 --- a/sys/dev/pv/if_xnf.c +++ b/sys/dev/pv/if_xnf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xnf.c,v 1.53 2017/03/13 01:00:15 mikeb Exp $ */ +/* $OpenBSD: if_xnf.c,v 1.54 2017/03/13 01:10:03 mikeb Exp $ */ /* * Copyright (c) 2015, 2016 Mike Belopuhov @@ -586,7 +586,7 @@ xnf_encap(struct xnf_softc *sc, struct mbuf *m_head, uint32_t *prod) flags = (sc->sc_domid << 16) | BUS_DMA_WRITE | BUS_DMA_WAITOK; if (bus_dmamap_load(sc->sc_dmat, dmap, m->m_data, m->m_len, NULL, flags)) { - DPRINTF("%s: failed to load %d bytes @%lu\n", + DPRINTF("%s: failed to load %u bytes @%lu\n", sc->sc_dev.dv_xname, m->m_len, mtod(m, vaddr_t) & PAGE_MASK); goto unroll; diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c index 9fd51df0ce0..bedea7ab37d 100644 --- a/sys/dev/pv/xbf.c +++ b/sys/dev/pv/xbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbf.c,v 1.25 2017/03/13 01:00:15 mikeb Exp $ */ +/* $OpenBSD: xbf.c,v 1.26 2017/03/13 01:10:03 mikeb Exp $ */ /* * Copyright (c) 2016 Mike Belopuhov @@ -467,7 +467,7 @@ xbf_load_xs(struct scsi_xfer *xs, int desc) error = bus_dmamap_load(sc->sc_dmat, map, xs->data, xs->datalen, NULL, mapflags); if (error) { - DPRINTF("%s: failed to load %u bytes of data\n", + DPRINTF("%s: failed to load %d bytes of data\n", sc->sc_dev.dv_xname, xs->datalen); return (-1); } @@ -530,7 +530,7 @@ xbf_bounce_xs(struct scsi_xfer *xs, int desc) map = dma->dma_map; - DPRINTF("%s: bouncing %d bytes via %ld size map with %d segments\n", + DPRINTF("%s: bouncing %d bytes via %lu size map with %d segments\n", sc->sc_dev.dv_xname, xs->datalen, size, map->dm_nsegs); if (ISSET(xs->flags, SCSI_DATA_OUT)) @@ -642,7 +642,7 @@ xbf_submit_cmd(struct scsi_xfer *xs) xrd->xrd_req.req_sector = lba; if (operation == XBF_OP_READ || operation == XBF_OP_WRITE) { - DPRINTF("%s: desc %u %s%s lba %llu nsec %u len %u\n", + DPRINTF("%s: desc %d %s%s lba %llu nsec %u len %d\n", sc->sc_dev.dv_xname, desc, operation == XBF_OP_READ ? "read" : "write", ISSET(xs->flags, SCSI_POLL) ? "-poll" : "", lba, nblk, xs->datalen); @@ -654,7 +654,7 @@ xbf_submit_cmd(struct scsi_xfer *xs) if (error) return (error); } else { - DPRINTF("%s: desc %u %s%s lba %llu\n", sc->sc_dev.dv_xname, + DPRINTF("%s: desc %d %s%s lba %llu\n", sc->sc_dev.dv_xname, desc, operation == XBF_OP_FLUSH ? "flush" : "barrier", ISSET(xs->flags, SCSI_POLL) ? "-poll" : "", lba); xrd->xrd_req.req_nsegs = 0; @@ -720,7 +720,7 @@ xbf_complete_cmd(struct scsi_xfer *xs, int desc) sc->sc_xs[desc] = NULL; - DPRINTF("%s: completing desc %u(%llu) op %u with error %d\n", + DPRINTF("%s: completing desc %d(%llu) op %u with error %d\n", sc->sc_dev.dv_xname, desc, xrd->xrd_rsp.rsp_id, xrd->xrd_rsp.rsp_op, xrd->xrd_rsp.rsp_status); @@ -922,7 +922,7 @@ xbf_init(struct xbf_softc *sc) if (sc->sc_xr_ndesc > XBF_MAX_REQS) sc->sc_xr_ndesc = XBF_MAX_REQS; - DPRINTF("%s: %u ring pages, %u requests\n", + DPRINTF("%s: %u ring pages, %d requests\n", sc->sc_dev.dv_xname, sc->sc_xr_size, sc->sc_xr_ndesc); if (xbf_ring_create(sc)) @@ -1234,7 +1234,7 @@ xbf_stop(struct xbf_softc *sc) if (xs == NULL) continue; xrd = &sc->sc_xr->xr_desc[desc]; - DPRINTF("%s: aborting desc %u(%llu) op %u\n", + DPRINTF("%s: aborting desc %d(%llu) op %u\n", sc->sc_dev.dv_xname, desc, xrd->xrd_rsp.rsp_id, xrd->xrd_rsp.rsp_op); if (sc->sc_xs_bb[desc].dma_size > 0) diff --git a/sys/dev/pv/xenstore.c b/sys/dev/pv/xenstore.c index 72d5b26decd..ad02068ecc2 100644 --- a/sys/dev/pv/xenstore.c +++ b/sys/dev/pv/xenstore.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xenstore.c,v 1.42 2017/03/13 01:00:15 mikeb Exp $ */ +/* $OpenBSD: xenstore.c,v 1.43 2017/03/13 01:10:03 mikeb Exp $ */ /* * Copyright (c) 2015 Mike Belopuhov @@ -528,7 +528,7 @@ xs_intr(void *arg) again: if (xs->xs_rmsg == NULL) { if (avail < sizeof(xmh)) { - DPRINTF("%s: incomplete header: %d\n", + DPRINTF("%s: incomplete header: %u\n", sc->sc_dev.dv_xname, avail); goto out; } |
