diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-04-20 20:31:14 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-04-20 20:31:14 +0000 |
commit | de5376f6ab54105d367ef84762d22711310371e7 (patch) | |
tree | bf44ed50c2db9351ff55368d75f45c807cc72475 /sys/dev/pci | |
parent | e1d297c29cadf0be3ed3775c0cfbcd97d01d7b9a (diff) |
Fix various printf() issues: too many arguments, not enough arguments, argument
order reversed, wrong modifiers. ok deraadt@ marco@ mickey@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/auich.c | 5 | ||||
-rw-r--r-- | sys/dev/pci/if_epic_pci.c | 12 | ||||
-rw-r--r-- | sys/dev/pci/if_ixgb.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_pcn.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_san_xilinx.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/if_sandrv.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_sk.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/ises.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/siop_pci_common.c | 5 |
9 files changed, 24 insertions, 24 deletions
diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c index 8e961aa244a..13f569bbe1f 100644 --- a/sys/dev/pci/auich.c +++ b/sys/dev/pci/auich.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auich.c,v 1.58 2006/02/13 06:15:32 brad Exp $ */ +/* $OpenBSD: auich.c,v 1.59 2006/04/20 20:31:12 miod Exp $ */ /* * Copyright (c) 2000,2001 Michael Shalayeff @@ -423,7 +423,8 @@ auich_attach(parent, self, aux) } if (bus_dmamap_load_raw(sc->dmat, sc->dmalist_map, sc->dmalist_seg, segs, dmasz, BUS_DMA_NOWAIT)) { - printf(": failed to load dmalist map: %d segs %u size\n", segs, dmasz); + printf(": failed to load dmalist map: %d segs %lu size\n", + segs, (u_long)dmasz); bus_dmamap_destroy(sc->dmat, sc->dmalist_map); bus_dmamem_unmap(sc->dmat, sc->dmalist_kva, dmasz); bus_dmamem_free(sc->dmat, sc->dmalist_seg, segs); diff --git a/sys/dev/pci/if_epic_pci.c b/sys/dev/pci/if_epic_pci.c index 33bea022c41..e6f0d53ccd6 100644 --- a/sys/dev/pci/if_epic_pci.c +++ b/sys/dev/pci/if_epic_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_epic_pci.c,v 1.4 2005/12/15 23:17:23 krw Exp $ */ +/* $OpenBSD: if_epic_pci.c,v 1.5 2006/04/20 20:31:12 miod Exp $ */ /* $NetBSD: if_epic_pci.c,v 1.28 2005/02/27 00:27:32 perry Exp $ */ /*- @@ -167,7 +167,7 @@ epic_pci_attach(struct device *parent, struct device *self, void *aux) case PCI_PMCSR_STATE_D1: case PCI_PMCSR_STATE_D2: printf(": waking up from power state D%d\n", - sc->sc_dev.dv_xname, reg & PCI_PMCSR_STATE_MASK); + reg & PCI_PMCSR_STATE_MASK); pci_conf_write(pc, pa->pa_tag, pmreg + PCI_PMCSR, (reg & ~PCI_PMCSR_STATE_MASK) | PCI_PMCSR_STATE_D0); @@ -179,7 +179,7 @@ epic_pci_attach(struct device *parent, struct device *self, void *aux) */ printf( ": unable to wake up from power state D3, " - "reboot required.\n", sc->sc_dev.dv_xname); + "reboot required.\n"); pci_conf_write(pc, pa->pa_tag, pmreg + PCI_PMCSR, (reg & ~PCI_PMCSR_STATE_MASK) | PCI_PMCSR_STATE_D0); @@ -204,8 +204,7 @@ epic_pci_attach(struct device *parent, struct device *self, void *aux) sc->sc_st = iot; sc->sc_sh = ioh; } else { - printf(": unable to map device registers\n", - sc->sc_dev.dv_xname); + printf(": unable to map device registers\n"); return; } @@ -215,8 +214,7 @@ epic_pci_attach(struct device *parent, struct device *self, void *aux) * Map and establish our interrupt. */ if (pci_intr_map(pa, &ih)) { - printf(": unable to map interrupt\n", - sc->sc_dev.dv_xname); + printf(": unable to map interrupt\n"); return; } intrstr = pci_intr_string(pc, ih); diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c index 1cd01e88b17..947694ecffd 100644 --- a/sys/dev/pci/if_ixgb.c +++ b/sys/dev/pci/if_ixgb.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_ixgb.c,v 1.12 2006/03/27 17:07:10 brad Exp $ */ +/* $OpenBSD: if_ixgb.c,v 1.13 2006/04/20 20:31:12 miod Exp $ */ #include <dev/pci/if_ixgb.h> @@ -2002,7 +2002,7 @@ ixgb_print_hw_stats(struct ixgb_softc *sc) bus_speed == ixgb_bus_speed_100 ? "100MHz" : bus_speed == ixgb_bus_speed_133 ? "133MHz" : "UNKNOWN"); - printf("ixgb%d: PCI_Bus_Speed = %s\n", unit, + printf("%s: PCI_Bus_Speed = %s\n", unit, buf_speed); snprintf(buf_type, sizeof(buf_type), diff --git a/sys/dev/pci/if_pcn.c b/sys/dev/pci/if_pcn.c index 1b112af8961..3dd09b6da54 100644 --- a/sys/dev/pci/if_pcn.c +++ b/sys/dev/pci/if_pcn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pcn.c,v 1.10 2006/03/25 22:41:45 djm Exp $ */ +/* $OpenBSD: if_pcn.c,v 1.11 2006/04/20 20:31:12 miod Exp $ */ /* $NetBSD: if_pcn.c,v 1.26 2005/05/07 09:15:44 is Exp $ */ /* @@ -640,7 +640,7 @@ pcn_attach(struct device *parent, struct device *self, void *aux) * Map and establish our interrupt. */ if (pci_intr_map(pa, &ih)) { - printf(": unable to map interrupt\n", sc->sc_dev.dv_xname); + printf(": unable to map interrupt\n"); return; } intrstr = pci_intr_string(pc, ih); diff --git a/sys/dev/pci/if_san_xilinx.c b/sys/dev/pci/if_san_xilinx.c index 78cf98742a2..b63e29d4f28 100644 --- a/sys/dev/pci/if_san_xilinx.c +++ b/sys/dev/pci/if_san_xilinx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_san_xilinx.c,v 1.17 2005/12/13 05:56:22 canacar Exp $ */ +/* $OpenBSD: if_san_xilinx.c,v 1.18 2006/04/20 20:31:12 miod Exp $ */ /*- * Copyright (c) 2001-2004 Sangoma Technologies (SAN) @@ -485,7 +485,7 @@ wan_xilinx_up(struct ifnet *ifp) sc->dma_mtu = xilinx_valid_mtu(ifp->if_mtu+100); if (!sc->dma_mtu) { - log(LOG_INFO, "%s:%s: Error invalid MTU %d\n", + log(LOG_INFO, "%s:%s: Error invalid MTU %lu\n", card->devname, sc->if_name, ifp->if_mtu); return (EINVAL); } @@ -1832,7 +1832,7 @@ xilinx_dma_tx(sdla_t *card, xilinx_softc_t *sc) if (ADDR_MASK(mtod(m, caddr_t), 0x03)) { /* The mbuf should already be aligned */ log(LOG_INFO, "%s: TX packet not aligned!\n", - sc->if_name, MAX_XILINX_TX_DMA_SIZE); + sc->if_name); m_freem(m); bit_clear((u_int8_t *)&sc->dma_status, TX_BUSY); return (EINVAL); diff --git a/sys/dev/pci/if_sandrv.c b/sys/dev/pci/if_sandrv.c index 7a7d3ae058f..b0687a6aa24 100644 --- a/sys/dev/pci/if_sandrv.c +++ b/sys/dev/pci/if_sandrv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sandrv.c,v 1.10 2005/04/01 21:42:36 canacar Exp $ */ +/* $OpenBSD: if_sandrv.c,v 1.11 2006/04/20 20:31:12 miod Exp $ */ /*- * Copyright (c) 2001-2004 Sangoma Technologies (SAN) @@ -555,7 +555,7 @@ sdla_intr_disestablish(void *phw) { sdlahw_t *hw = (sdlahw_t*)phw; - log(LOG_INFO, "%d: Disestablish interrupt is not defined!\n", + log(LOG_INFO, "%s: Disestablish interrupt is not defined!\n", hw->devname); return (EINVAL); } diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index 80e5ee6367c..f4ec075dd85 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sk.c,v 1.98 2006/04/17 10:11:29 brad Exp $ */ +/* $OpenBSD: if_sk.c,v 1.99 2006/04/20 20:31:12 miod Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1244,7 +1244,7 @@ sk_attach(struct device *parent, struct device *self, void *aux) } if (bus_dmamem_map(sc->sc_dmatag, &seg, rseg, sizeof(struct sk_ring_data), &kva, BUS_DMA_NOWAIT)) { - printf(": can't map dma buffers (%d bytes)\n", + printf(": can't map dma buffers (%z bytes)\n", sizeof(struct sk_ring_data)); goto fail_1; } diff --git a/sys/dev/pci/ises.c b/sys/dev/pci/ises.c index 64f0191d3dc..f7f5d728518 100644 --- a/sys/dev/pci/ises.c +++ b/sys/dev/pci/ises.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ises.c,v 1.29 2005/11/26 14:31:26 krw Exp $ */ +/* $OpenBSD: ises.c,v 1.30 2006/04/20 20:31:12 miod Exp $ */ /* * Copyright (c) 2000, 2001 Håkan Olsson (ho@crt.se) @@ -1552,7 +1552,7 @@ ises_hrng_init(struct ises_softc *sc) /* ACK the response */ WRITE_REG(sc, ISES_A_OQS, 0); DELAY(1); - printf(", rng active", sc->sc_dv.dv_xname); + printf(", rng active"); #ifdef ISESDEBUG /* Benchmark the HRNG. */ diff --git a/sys/dev/pci/siop_pci_common.c b/sys/dev/pci/siop_pci_common.c index aa10e8b34d6..0c609bc34b3 100644 --- a/sys/dev/pci/siop_pci_common.c +++ b/sys/dev/pci/siop_pci_common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siop_pci_common.c,v 1.14 2005/10/08 18:21:33 krw Exp $ */ +/* $OpenBSD: siop_pci_common.c,v 1.15 2006/04/20 20:31:12 miod Exp $ */ /* $NetBSD: siop_pci_common.c,v 1.25 2005/06/28 00:28:42 thorpej Exp $ */ /* @@ -308,7 +308,8 @@ siop_pci_attach_common(struct siop_pci_common_softc *pci_sc, if (pci_mapreg_map(pa, bar, memtype, 0, &siop_sc->sc_ramt, &siop_sc->sc_ramh, &siop_sc->sc_scriptaddr, &memsize, 0) == 0) { - printf(", using %dK of on-board RAM", memsize / 1024); + printf(", using %luK of on-board RAM", + (u_long)memsize / 1024); } else { printf(", can't map on-board RAM"); siop_sc->features &= ~SF_CHIP_RAM; |