summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorStefan Fritsch <sf@cvs.openbsd.org>2013-10-01 20:06:04 +0000
committerStefan Fritsch <sf@cvs.openbsd.org>2013-10-01 20:06:04 +0000
commit8df653d188782d1d8cd2094e2536882b1f060801 (patch)
tree7e9167ebaa037e7b509c3c98ff6492433311e158 /sys/dev/pci
parentba7fbfcdbf1c89cb49aa02de612a679f55b93140 (diff)
Use %z* for size_t
while there, fix a few %d into %u
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/amdiic.c6
-rw-r--r--sys/dev/pci/amdpm.c4
-rw-r--r--sys/dev/pci/if_iwi.c6
-rw-r--r--sys/dev/pci/if_iwn.c12
-rw-r--r--sys/dev/pci/if_lge.c6
-rw-r--r--sys/dev/pci/if_nge.c6
-rw-r--r--sys/dev/pci/if_tl.c4
-rw-r--r--sys/dev/pci/if_wb.c4
-rw-r--r--sys/dev/pci/if_wpi.c6
-rw-r--r--sys/dev/pci/piixpm.c4
-rw-r--r--sys/dev/pci/yds.c4
11 files changed, 31 insertions, 31 deletions
diff --git a/sys/dev/pci/amdiic.c b/sys/dev/pci/amdiic.c
index f8203e893a6..fa3b31646ab 100644
--- a/sys/dev/pci/amdiic.c
+++ b/sys/dev/pci/amdiic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: amdiic.c,v 1.10 2012/10/05 10:51:28 haesbaert Exp $ */
+/* $OpenBSD: amdiic.c,v 1.11 2013/10/01 20:06:00 sf Exp $ */
/*
* Copyright (c) 2005 Alexander Yurchenko <grange@openbsd.org>
@@ -340,8 +340,8 @@ amdiic_i2c_exec(void *cookie, i2c_op_t op, i2c_addr_t addr,
DELAY(AMDIIC_DELAY);
}
if (st == 0) {
- printf("%s: exec: op %d, addr 0x%02x, cmdlen %d, "
- "len %d, flags 0x%02x: timeout\n",
+ printf("%s: exec: op %d, addr 0x%02x, cmdlen %zu, "
+ "len %zu, flags 0x%02x: timeout\n",
sc->sc_dev.dv_xname, op, addr, cmdlen, len, flags);
return (1);
}
diff --git a/sys/dev/pci/amdpm.c b/sys/dev/pci/amdpm.c
index 541070118e8..3b13916a228 100644
--- a/sys/dev/pci/amdpm.c
+++ b/sys/dev/pci/amdpm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: amdpm.c,v 1.30 2013/07/03 15:34:48 sf Exp $ */
+/* $OpenBSD: amdpm.c,v 1.31 2013/10/01 20:06:00 sf Exp $ */
/*
* Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org>
@@ -504,7 +504,7 @@ timeout:
/*
* Transfer timeout. Kill the transaction and clear status bits.
*/
- printf("%s: exec: op %d, addr 0x%02x, cmdlen %d, len %d, "
+ printf("%s: exec: op %d, addr 0x%02x, cmdlen %zu, len %zu, "
"flags 0x%02x: timeout, status 0x%b\n",
sc->sc_dev.dv_xname, op, addr, cmdlen, len, flags,
st, AMDPM_SMBSTAT_BITS);
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c
index 832449c67ba..977c5e359ff 100644
--- a/sys/dev/pci/if_iwi.c
+++ b/sys/dev/pci/if_iwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwi.c,v 1.112 2013/08/07 01:06:35 bluhm Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.113 2013/10/01 20:06:00 sf Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -2238,7 +2238,7 @@ iwi_init(struct ifnet *ifp)
goto fail1;
}
if (size < sizeof (struct iwi_firmware_hdr)) {
- printf("%s: firmware image too short: %u bytes\n",
+ printf("%s: firmware image too short: %zu bytes\n",
sc->sc_dev.dv_xname, size);
error = EINVAL;
goto fail2;
@@ -2255,7 +2255,7 @@ iwi_init(struct ifnet *ifp)
if (size < sizeof (struct iwi_firmware_hdr) + letoh32(hdr->bootsz) +
letoh32(hdr->ucodesz) + letoh32(hdr->mainsz)) {
- printf("%s: firmware image too short: %u bytes\n",
+ printf("%s: firmware image too short: %zu bytes\n",
sc->sc_dev.dv_xname, size);
error = EINVAL;
goto fail2;
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index 8b33eb3e2f5..ace5a222ba4 100644
--- a/sys/dev/pci/if_iwn.c
+++ b/sys/dev/pci/if_iwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwn.c,v 1.123 2013/08/29 19:06:39 syl Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.124 2013/10/01 20:06:01 sf Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -5348,7 +5348,7 @@ iwn_read_firmware_leg(struct iwn_softc *sc, struct iwn_fw_info *fw)
ptr++;
}
if (fw->size < hdrlen) {
- printf("%s: firmware too short: %d bytes\n",
+ printf("%s: firmware too short: %zu bytes\n",
sc->sc_dev.dv_xname, fw->size);
return EINVAL;
}
@@ -5361,7 +5361,7 @@ iwn_read_firmware_leg(struct iwn_softc *sc, struct iwn_fw_info *fw)
/* Check that all firmware sections fit. */
if (fw->size < hdrlen + fw->main.textsz + fw->main.datasz +
fw->init.textsz + fw->init.datasz + fw->boot.textsz) {
- printf("%s: firmware too short: %d bytes\n",
+ printf("%s: firmware too short: %zu bytes\n",
sc->sc_dev.dv_xname, fw->size);
return EINVAL;
}
@@ -5389,7 +5389,7 @@ iwn_read_firmware_tlv(struct iwn_softc *sc, struct iwn_fw_info *fw,
uint32_t len;
if (fw->size < sizeof (*hdr)) {
- printf("%s: firmware too short: %d bytes\n",
+ printf("%s: firmware too short: %zu bytes\n",
sc->sc_dev.dv_xname, fw->size);
return EINVAL;
}
@@ -5421,7 +5421,7 @@ iwn_read_firmware_tlv(struct iwn_softc *sc, struct iwn_fw_info *fw,
ptr += sizeof (*tlv);
if (ptr + len > end) {
- printf("%s: firmware too short: %d bytes\n",
+ printf("%s: firmware too short: %zu bytes\n",
sc->sc_dev.dv_xname, fw->size);
return EINVAL;
}
@@ -5476,7 +5476,7 @@ iwn_read_firmware(struct iwn_softc *sc)
return error;
}
if (fw->size < sizeof (uint32_t)) {
- printf("%s: firmware too short: %d bytes\n",
+ printf("%s: firmware too short: %zu bytes\n",
sc->sc_dev.dv_xname, fw->size);
free(fw->data, M_DEVBUF);
return EINVAL;
diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c
index 7c4977aaac6..19503c2edef 100644
--- a/sys/dev/pci/if_lge.c
+++ b/sys/dev/pci/if_lge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_lge.c,v 1.59 2013/08/21 05:21:44 dlg Exp $ */
+/* $OpenBSD: if_lge.c,v 1.60 2013/10/01 20:06:01 sf Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -482,7 +482,7 @@ lge_attach(struct device *parent, struct device *self, void *aux)
if (bus_dmamem_map(sc->sc_dmatag, &seg, rseg,
sizeof(struct lge_list_data), &kva,
BUS_DMA_NOWAIT)) {
- printf("%s: can't map dma buffers (%d bytes)\n",
+ printf("%s: can't map dma buffers (%zd bytes)\n",
sc->sc_dv.dv_xname, sizeof(struct lge_list_data));
goto fail_3;
}
@@ -725,7 +725,7 @@ lge_alloc_jumbo_mem(struct lge_softc *sc)
state = 1;
if (bus_dmamem_map(sc->sc_dmatag, &seg, rseg, LGE_JMEM, &kva,
BUS_DMA_NOWAIT)) {
- printf("%s: can't map dma buffers (%d bytes)\n",
+ printf("%s: can't map dma buffers (%zd bytes)\n",
sc->sc_dv.dv_xname, LGE_JMEM);
error = ENOBUFS;
goto out;
diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c
index bfc983d2f75..0b53b7f0ae5 100644
--- a/sys/dev/pci/if_nge.c
+++ b/sys/dev/pci/if_nge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nge.c,v 1.75 2013/08/21 05:21:44 dlg Exp $ */
+/* $OpenBSD: if_nge.c,v 1.76 2013/10/01 20:06:01 sf Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -812,7 +812,7 @@ nge_attach(parent, self, aux)
if (bus_dmamem_map(sc->sc_dmatag, &seg, rseg,
sizeof(struct nge_list_data), &kva,
BUS_DMA_NOWAIT)) {
- printf("%s: can't map dma buffers (%d bytes)\n",
+ printf("%s: can't map dma buffers (%zd bytes)\n",
sc->sc_dv.dv_xname, sizeof(struct nge_list_data));
goto fail_3;
}
@@ -1084,7 +1084,7 @@ nge_alloc_jumbo_mem(sc)
state = 1;
if (bus_dmamem_map(sc->sc_dmatag, &seg, rseg, NGE_JMEM, &kva,
BUS_DMA_NOWAIT)) {
- printf("%s: can't map dma buffers (%d bytes)\n",
+ printf("%s: can't map dma buffers (%zd bytes)\n",
sc->sc_dv.dv_xname, NGE_JMEM);
error = ENOBUFS;
goto out;
diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c
index 8c916a83058..02941a31c26 100644
--- a/sys/dev/pci/if_tl.c
+++ b/sys/dev/pci/if_tl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tl.c,v 1.54 2013/08/07 01:06:38 bluhm Exp $ */
+/* $OpenBSD: if_tl.c,v 1.55 2013/10/01 20:06:01 sf Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -2051,7 +2051,7 @@ tl_attach(parent, self, aux)
}
if (bus_dmamem_map(sc->sc_dmat, &seg, rseg, sizeof(struct tl_list_data),
&kva, BUS_DMA_NOWAIT)) {
- printf("%s: can't map dma buffers (%d bytes)\n",
+ printf("%s: can't map dma buffers (%zd bytes)\n",
sc->sc_dev.dv_xname, sizeof(struct tl_list_data));
bus_dmamem_free(sc->sc_dmat, &seg, rseg);
return;
diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c
index 96762a10723..74ffbb3198f 100644
--- a/sys/dev/pci/if_wb.c
+++ b/sys/dev/pci/if_wb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wb.c,v 1.53 2013/08/21 05:21:45 dlg Exp $ */
+/* $OpenBSD: if_wb.c,v 1.54 2013/10/01 20:06:02 sf Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -772,7 +772,7 @@ wb_attach(parent, self, aux)
}
if (bus_dmamem_map(pa->pa_dmat, &seg, rseg,
sizeof(struct wb_list_data), &kva, BUS_DMA_NOWAIT)) {
- printf(": can't map list data, size %d\n",
+ printf(": can't map list data, size %zd\n",
sizeof(struct wb_list_data));
goto fail_3;
}
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c
index 2ceb88661e3..70951895924 100644
--- a/sys/dev/pci/if_wpi.c
+++ b/sys/dev/pci/if_wpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wpi.c,v 1.112 2013/08/07 01:06:39 bluhm Exp $ */
+/* $OpenBSD: if_wpi.c,v 1.113 2013/10/01 20:06:02 sf Exp $ */
/*-
* Copyright (c) 2006-2008
@@ -2987,7 +2987,7 @@ wpi_read_firmware(struct wpi_softc *sc)
return error;
}
if (size < sizeof (*hdr)) {
- printf("%s: truncated firmware header: %d bytes\n",
+ printf("%s: truncated firmware header: %zu bytes\n",
sc->sc_dev.dv_xname, size);
free(fw->data, M_DEVBUF);
return EINVAL;
@@ -3016,7 +3016,7 @@ wpi_read_firmware(struct wpi_softc *sc)
/* Check that all firmware sections fit. */
if (size < sizeof (*hdr) + fw->main.textsz + fw->main.datasz +
fw->init.textsz + fw->init.datasz + fw->boot.textsz) {
- printf("%s: firmware file too short: %d bytes\n",
+ printf("%s: firmware file too short: %zu bytes\n",
sc->sc_dev.dv_xname, size);
free(fw->data, M_DEVBUF);
return EINVAL;
diff --git a/sys/dev/pci/piixpm.c b/sys/dev/pci/piixpm.c
index 782c1acc818..86fb0fe184a 100644
--- a/sys/dev/pci/piixpm.c
+++ b/sys/dev/pci/piixpm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: piixpm.c,v 1.38 2012/10/05 10:51:28 haesbaert Exp $ */
+/* $OpenBSD: piixpm.c,v 1.39 2013/10/01 20:06:02 sf Exp $ */
/*
* Copyright (c) 2005, 2006 Alexander Yurchenko <grange@openbsd.org>
@@ -359,7 +359,7 @@ timeout:
/*
* Transfer timeout. Kill the transaction and clear status bits.
*/
- printf("%s: exec: op %d, addr 0x%02x, cmdlen %d, len %d, "
+ printf("%s: exec: op %d, addr 0x%02x, cmdlen %zu, len %zu, "
"flags 0x%02x: timeout, status 0x%b\n",
sc->sc_dev.dv_xname, op, addr, cmdlen, len, flags,
st, PIIX_SMB_HS_BITS);
diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c
index 7b75622215c..c7b16e8aeeb 100644
--- a/sys/dev/pci/yds.c
+++ b/sys/dev/pci/yds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yds.c,v 1.43 2013/05/24 07:58:47 ratchov Exp $ */
+/* $OpenBSD: yds.c,v 1.44 2013/10/01 20:06:02 sf Exp $ */
/* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */
/*
@@ -1345,7 +1345,7 @@ yds_trigger_output(void *addr, void *start, void *end, int blksize,
u_int32_t ctrlsize;
if ((ctrlsize = YREAD4(sc, YDS_PLAY_CTRLSIZE)) !=
sizeof(struct play_slot_ctrl_bank) / sizeof(u_int32_t))
- panic("%s: invalid play slot ctrldata %d %d",
+ panic("%s: invalid play slot ctrldata %d %zd",
sc->sc_dev.dv_xname, ctrlsize,
sizeof(struct play_slot_ctrl_bank));
}