summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2016-03-18 01:28:41 +0000
committerjhibbits <jhibbits@FreeBSD.org>2016-03-18 01:28:41 +0000
commit720f47c9edd51268b4c29ce82e0436209cd8aa23 (patch)
tree79d2db0783ae236486e47ff49d1e85214325a9e0 /sys/dev/sound
parentaf520aec51ed6695cde23fdbf339ecb995ac52ab (diff)
downloadFreeBSD-src-720f47c9edd51268b4c29ce82e0436209cd8aa23.zip
FreeBSD-src-720f47c9edd51268b4c29ce82e0436209cd8aa23.tar.gz
Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.
On some architectures, u_long isn't large enough for resource definitions. Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but type `long' is only 32-bit. This extends rman's resources to uintmax_t. With this change, any resource can feasibly be placed anywhere in physical memory (within the constraints of the driver). Why uintmax_t and not something machine dependent, or uint64_t? Though it's possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on 32-bit architectures. 64-bit architectures should have plenty of RAM to absorb the increase on resource sizes if and when this occurs, and the number of resources on memory-constrained systems should be sufficiently small as to not pose a drastic overhead. That being said, uintmax_t was chosen for source clarity. If it's specified as uint64_t, all printf()-like calls would either need casts to uintmax_t, or be littered with PRI*64 macros. Casts to uintmax_t aren't horrible, but it would also bake into the API for resource_list_print_type() either a hidden assumption that entries get cast to uintmax_t for printing, or these calls would need the PRI*64 macros. Since source code is meant to be read more often than written, I chose the clearest path of simply using uintmax_t. Tested on a PowerPC p5020-based board, which places all device resources in 0xfxxxxxxxx, and has 8GB RAM. Regression tested on qemu-system-i386 Regression tested on qemu-system-mips (malta profile) Tested PAE and devinfo on virtualbox (live CD) Special thanks to bz for his testing on ARM. Reviewed By: bz, jhb (previous) Relnotes: Yes Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D4544
Diffstat (limited to 'sys/dev/sound')
-rw-r--r--sys/dev/sound/isa/ad1816.c4
-rw-r--r--sys/dev/sound/isa/ess.c6
-rw-r--r--sys/dev/sound/isa/mss.c4
-rw-r--r--sys/dev/sound/isa/sb16.c4
-rw-r--r--sys/dev/sound/isa/sb8.c2
-rw-r--r--sys/dev/sound/pci/als4000.c2
-rw-r--r--sys/dev/sound/pci/atiixp.c2
-rw-r--r--sys/dev/sound/pci/aureal.c2
-rw-r--r--sys/dev/sound/pci/cmi.c2
-rw-r--r--sys/dev/sound/pci/cs4281.c2
-rw-r--r--sys/dev/sound/pci/csapcm.c2
-rw-r--r--sys/dev/sound/pci/ds1.c2
-rw-r--r--sys/dev/sound/pci/emu10k1.c2
-rw-r--r--sys/dev/sound/pci/emu10kx.c2
-rw-r--r--sys/dev/sound/pci/envy24.c2
-rw-r--r--sys/dev/sound/pci/envy24ht.c2
-rw-r--r--sys/dev/sound/pci/es137x.c2
-rw-r--r--sys/dev/sound/pci/fm801.c2
-rw-r--r--sys/dev/sound/pci/hdspe-pcm.c2
-rw-r--r--sys/dev/sound/pci/ich.c2
-rw-r--r--sys/dev/sound/pci/maestro.c2
-rw-r--r--sys/dev/sound/pci/maestro3.c2
-rw-r--r--sys/dev/sound/pci/neomagic.c2
-rw-r--r--sys/dev/sound/pci/solo.c2
-rw-r--r--sys/dev/sound/pci/t4dwave.c2
-rw-r--r--sys/dev/sound/pci/via8233.c2
-rw-r--r--sys/dev/sound/pci/via82c686.c2
-rw-r--r--sys/dev/sound/pci/vibes.c4
28 files changed, 34 insertions, 34 deletions
diff --git a/sys/dev/sound/isa/ad1816.c b/sys/dev/sound/isa/ad1816.c
index f3bb89a..2ae39cf 100644
--- a/sys/dev/sound/isa/ad1816.c
+++ b/sys/dev/sound/isa/ad1816.c
@@ -624,11 +624,11 @@ ad1816_attach(device_t dev)
goto no;
}
if (ad1816->drq2)
- snprintf(status2, SND_STATUSLEN, ":%ld", rman_get_start(ad1816->drq2));
+ snprintf(status2, SND_STATUSLEN, ":%jd", rman_get_start(ad1816->drq2));
else
status2[0] = '\0';
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld%s bufsz %u %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd drq %jd%s bufsz %u %s",
rman_get_start(ad1816->io_base),
rman_get_start(ad1816->irq),
rman_get_start(ad1816->drq1),
diff --git a/sys/dev/sound/isa/ess.c b/sys/dev/sound/isa/ess.c
index 5fd9529..e4032de 100644
--- a/sys/dev/sound/isa/ess.c
+++ b/sys/dev/sound/isa/ess.c
@@ -867,12 +867,12 @@ ess_attach(device_t dev)
}
if (sc->drq2)
- snprintf(buf, SND_STATUSLEN, ":%ld", rman_get_start(sc->drq2));
+ snprintf(buf, SND_STATUSLEN, ":%jd", rman_get_start(sc->drq2));
else
buf[0] = '\0';
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld%s bufsz %u %s",
- rman_get_start(sc->io_base), rman_get_start(sc->irq),
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd drq %jd%s bufsz %u %s",
+ rman_get_start(sc->io_base), rman_get_start(sc->irq),
rman_get_start(sc->drq1), buf, sc->bufsize,
PCM_KLDSTRING(snd_ess));
diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c
index 7aaef06..62f6617 100644
--- a/sys/dev/sound/isa/mss.c
+++ b/sys/dev/sound/isa/mss.c
@@ -1326,7 +1326,7 @@ mss_probe(device_t dev)
}
tmp &= 0x3f;
if (!(tmp == 0x04 || tmp == 0x0f || tmp == 0x00 || tmp == 0x05)) {
- BVDDB(printf("No MSS signature detected on port 0x%lx (0x%x)\n",
+ BVDDB(printf("No MSS signature detected on port 0x%jx (0x%x)\n",
rman_get_start(mss->io_base), tmpx));
goto no;
}
@@ -1767,7 +1767,7 @@ mss_doattach(device_t dev, struct mss_info *mss)
else
status2[0] = '\0';
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %d%s bufsz %u",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd drq %d%s bufsz %u",
rman_get_start(mss->io_base), rman_get_start(mss->irq), pdma, status2, mss->bufsize);
if (pcm_register(dev, mss, 1, 1)) goto no;
diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c
index 536de77..946c6bf 100644
--- a/sys/dev/sound/isa/sb16.c
+++ b/sys/dev/sound/isa/sb16.c
@@ -854,11 +854,11 @@ sb16_attach(device_t dev)
}
if (!(pcm_getflags(dev) & SD_F_SIMPLEX))
- snprintf(status2, SND_STATUSLEN, ":%ld", rman_get_start(sb->drq2));
+ snprintf(status2, SND_STATUSLEN, ":%jd", rman_get_start(sb->drq2));
else
status2[0] = '\0';
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld%s bufsz %u %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd drq %jd%s bufsz %u %s",
rman_get_start(sb->io_base), rman_get_start(sb->irq),
rman_get_start(sb->drq1), status2, sb->bufsize,
PCM_KLDSTRING(snd_sb16));
diff --git a/sys/dev/sound/isa/sb8.c b/sys/dev/sound/isa/sb8.c
index 7c39515..c9ed746 100644
--- a/sys/dev/sound/isa/sb8.c
+++ b/sys/dev/sound/isa/sb8.c
@@ -749,7 +749,7 @@ sb_attach(device_t dev)
goto no;
}
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld bufsz %u %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd drq %jd bufsz %u %s",
rman_get_start(sb->io_base), rman_get_start(sb->irq),
rman_get_start(sb->drq), sb->bufsize, PCM_KLDSTRING(snd_sb8));
diff --git a/sys/dev/sound/pci/als4000.c b/sys/dev/sound/pci/als4000.c
index b214333..bb38749 100644
--- a/sys/dev/sound/pci/als4000.c
+++ b/sys/dev/sound/pci/als4000.c
@@ -848,7 +848,7 @@ als_pci_attach(device_t dev)
pcm_addchan(dev, PCMDIR_PLAY, &alspchan_class, sc);
pcm_addchan(dev, PCMDIR_REC, &alsrchan_class, sc);
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s",
rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_als4000));
pcm_setstatus(dev, status);
return 0;
diff --git a/sys/dev/sound/pci/atiixp.c b/sys/dev/sound/pci/atiixp.c
index 8df67aa..ca9a539 100644
--- a/sys/dev/sound/pci/atiixp.c
+++ b/sys/dev/sound/pci/atiixp.c
@@ -1097,7 +1097,7 @@ atiixp_chip_post_init(void *arg)
"polling", CTLTYPE_INT | CTLFLAG_RW, sc->dev, sizeof(sc->dev),
sysctl_atiixp_polling, "I", "Enable polling mode");
- snprintf(status, SND_STATUSLEN, "at memory 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at memory 0x%jx irq %jd %s",
rman_get_start(sc->reg), rman_get_start(sc->irq),
PCM_KLDSTRING(snd_atiixp));
diff --git a/sys/dev/sound/pci/aureal.c b/sys/dev/sound/pci/aureal.c
index 67af075..f990f43 100644
--- a/sys/dev/sound/pci/aureal.c
+++ b/sys/dev/sound/pci/aureal.c
@@ -645,7 +645,7 @@ au_pci_attach(device_t dev)
goto bad;
}
- snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at %s 0x%jx irq %jd %s",
(type[0] == SYS_RES_IOPORT)? "io" : "memory",
rman_get_start(reg[0]), rman_get_start(irq),PCM_KLDSTRING(snd_aureal));
diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c
index 6075a92..9e62659 100644
--- a/sys/dev/sound/pci/cmi.c
+++ b/sys/dev/sound/pci/cmi.c
@@ -995,7 +995,7 @@ cmi_attach(device_t dev)
pcm_addchan(dev, PCMDIR_PLAY, &cmichan_class, sc);
pcm_addchan(dev, PCMDIR_REC, &cmichan_class, sc);
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s",
rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_cmi));
pcm_setstatus(dev, status);
diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c
index 929b9d7..4750daf 100644
--- a/sys/dev/sound/pci/cs4281.c
+++ b/sys/dev/sound/pci/cs4281.c
@@ -849,7 +849,7 @@ cs4281_pci_attach(device_t dev)
pcm_addchan(dev, PCMDIR_PLAY, &cs4281chan_class, sc);
pcm_addchan(dev, PCMDIR_REC, &cs4281chan_class, sc);
- snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at %s 0x%jx irq %jd %s",
(sc->regtype == SYS_RES_IOPORT)? "io" : "memory",
rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_cs4281));
pcm_setstatus(dev, status);
diff --git a/sys/dev/sound/pci/csapcm.c b/sys/dev/sound/pci/csapcm.c
index 89ffd2b..5a1544d 100644
--- a/sys/dev/sound/pci/csapcm.c
+++ b/sys/dev/sound/pci/csapcm.c
@@ -821,7 +821,7 @@ pcmcsa_attach(device_t dev)
return (ENXIO);
}
- snprintf(status, SND_STATUSLEN, "at irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at irq %jd %s",
rman_get_start(resp->irq),PCM_KLDSTRING(snd_csa));
/* Enable interrupt. */
diff --git a/sys/dev/sound/pci/ds1.c b/sys/dev/sound/pci/ds1.c
index 302271a..23f3d5c 100644
--- a/sys/dev/sound/pci/ds1.c
+++ b/sys/dev/sound/pci/ds1.c
@@ -1010,7 +1010,7 @@ ds_pci_attach(device_t dev)
goto bad;
}
- snprintf(status, SND_STATUSLEN, "at memory 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at memory 0x%jx irq %jd %s",
rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_ds1));
if (pcm_register(dev, sc, DS1_CHANS, 2))
diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c
index c4a13f3..f1d77ee 100644
--- a/sys/dev/sound/pci/emu10k1.c
+++ b/sys/dev/sound/pci/emu10k1.c
@@ -2132,7 +2132,7 @@ emu_pci_attach(device_t dev)
goto bad;
}
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s",
rman_get_start(sc->reg), rman_get_start(sc->irq),
PCM_KLDSTRING(snd_emu10k1));
diff --git a/sys/dev/sound/pci/emu10kx.c b/sys/dev/sound/pci/emu10kx.c
index b2eaf2c..bd97ab8 100644
--- a/sys/dev/sound/pci/emu10kx.c
+++ b/sys/dev/sound/pci/emu10kx.c
@@ -3225,7 +3225,7 @@ emu_pci_attach(device_t dev)
device_printf(dev, "unable to create control device\n");
goto bad;
}
- snprintf(status, 255, "rev %d at io 0x%lx irq %ld", sc->rev, rman_get_start(sc->reg), rman_get_start(sc->irq));
+ snprintf(status, 255, "rev %d at io 0x%jx irq %jd", sc->rev, rman_get_start(sc->reg), rman_get_start(sc->irq));
/* Voices */
for (i = 0; i < NUM_G; i++) {
diff --git a/sys/dev/sound/pci/envy24.c b/sys/dev/sound/pci/envy24.c
index c4eaa10..9272a95 100644
--- a/sys/dev/sound/pci/envy24.c
+++ b/sys/dev/sound/pci/envy24.c
@@ -2599,7 +2599,7 @@ envy24_pci_attach(device_t dev)
/* set status iformation */
snprintf(status, SND_STATUSLEN,
- "at io 0x%lx:%ld,0x%lx:%ld,0x%lx:%ld,0x%lx:%ld irq %ld",
+ "at io 0x%jx:%jd,0x%jx:%jd,0x%jx:%jd,0x%jx:%jd irq %jd",
rman_get_start(sc->cs),
rman_get_end(sc->cs) - rman_get_start(sc->cs) + 1,
rman_get_start(sc->ddma),
diff --git a/sys/dev/sound/pci/envy24ht.c b/sys/dev/sound/pci/envy24ht.c
index 85a36c2..fe1fb19 100644
--- a/sys/dev/sound/pci/envy24ht.c
+++ b/sys/dev/sound/pci/envy24ht.c
@@ -2507,7 +2507,7 @@ envy24ht_pci_attach(device_t dev)
/* set status iformation */
snprintf(status, SND_STATUSLEN,
- "at io 0x%lx:%ld,0x%lx:%ld irq %ld",
+ "at io 0x%jx:%jd,0x%jx:%jd irq %jd",
rman_get_start(sc->cs),
rman_get_end(sc->cs) - rman_get_start(sc->cs) + 1,
rman_get_start(sc->mt),
diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c
index 0dd88a8..7032c84 100644
--- a/sys/dev/sound/pci/es137x.c
+++ b/sys/dev/sound/pci/es137x.c
@@ -1856,7 +1856,7 @@ es_pci_attach(device_t dev)
goto bad;
}
- snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at %s 0x%jx irq %jd %s",
(es->regtype == SYS_RES_IOPORT)? "io" : "memory",
rman_get_start(es->reg), rman_get_start(es->irq),
PCM_KLDSTRING(snd_es137x));
diff --git a/sys/dev/sound/pci/fm801.c b/sys/dev/sound/pci/fm801.c
index 82b1d77..252e714 100644
--- a/sys/dev/sound/pci/fm801.c
+++ b/sys/dev/sound/pci/fm801.c
@@ -639,7 +639,7 @@ fm801_pci_attach(device_t dev)
goto oops;
}
- snprintf(status, 64, "at %s 0x%lx irq %ld %s",
+ snprintf(status, 64, "at %s 0x%jx irq %jd %s",
(fm801->regtype == SYS_RES_IOPORT)? "io" : "memory",
rman_get_start(fm801->reg), rman_get_start(fm801->irq),PCM_KLDSTRING(snd_fm801));
diff --git a/sys/dev/sound/pci/hdspe-pcm.c b/sys/dev/sound/pci/hdspe-pcm.c
index dc62377..d84712d 100644
--- a/sys/dev/sound/pci/hdspe-pcm.c
+++ b/sys/dev/sound/pci/hdspe-pcm.c
@@ -668,7 +668,7 @@ hdspe_pcm_attach(device_t dev)
scp->chnum++;
}
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s",
rman_get_start(scp->sc->cs),
rman_get_start(scp->sc->irq),
PCM_KLDSTRING(snd_hdspe));
diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c
index 4895ad6..61b6781 100644
--- a/sys/dev/sound/pci/ich.c
+++ b/sys/dev/sound/pci/ich.c
@@ -687,7 +687,7 @@ ich_setstatus(struct sc_info *sc)
char status[SND_STATUSLEN];
snprintf(status, SND_STATUSLEN,
- "at io 0x%lx, 0x%lx irq %ld bufsz %u %s",
+ "at io 0x%jx, 0x%jx irq %jd bufsz %u %s",
rman_get_start(sc->nambar), rman_get_start(sc->nabmbar),
rman_get_start(sc->irq), sc->bufsz,PCM_KLDSTRING(snd_ich));
diff --git a/sys/dev/sound/pci/maestro.c b/sys/dev/sound/pci/maestro.c
index c7cbb35..fbadf3b 100644
--- a/sys/dev/sound/pci/maestro.c
+++ b/sys/dev/sound/pci/maestro.c
@@ -1917,7 +1917,7 @@ agg_attach(device_t dev)
adjust_pchbase(ess->pch, ess->playchns, ess->bufsz);
snprintf(status, SND_STATUSLEN,
- "port 0x%lx-0x%lx irq %ld at device %d.%d on pci%d",
+ "port 0x%jx-0x%jx irq %jd at device %d.%d on pci%d",
rman_get_start(reg), rman_get_end(reg), rman_get_start(irq),
pci_get_slot(dev), pci_get_function(dev), pci_get_bus(dev));
pcm_setstatus(dev, status);
diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c
index 20a9bda..5bab021 100644
--- a/sys/dev/sound/pci/maestro3.c
+++ b/sys/dev/sound/pci/maestro3.c
@@ -1440,7 +1440,7 @@ m3_pci_attach(device_t dev)
goto bad;
}
}
- snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at %s 0x%jx irq %jd %s",
(sc->regtype == SYS_RES_IOPORT)? "io" : "memory",
rman_get_start(sc->reg), rman_get_start(sc->irq),
PCM_KLDSTRING(snd_maestro3));
diff --git a/sys/dev/sound/pci/neomagic.c b/sys/dev/sound/pci/neomagic.c
index 71c1bf1..8a78bf7 100644
--- a/sys/dev/sound/pci/neomagic.c
+++ b/sys/dev/sound/pci/neomagic.c
@@ -702,7 +702,7 @@ nm_pci_attach(device_t dev)
goto bad;
}
- snprintf(status, SND_STATUSLEN, "at memory 0x%lx, 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at memory 0x%jx, 0x%jx irq %jd %s",
rman_get_start(sc->buf), rman_get_start(sc->reg),
rman_get_start(sc->irq),PCM_KLDSTRING(snd_neomagic));
diff --git a/sys/dev/sound/pci/solo.c b/sys/dev/sound/pci/solo.c
index 534d810..dc46ac8 100644
--- a/sys/dev/sound/pci/solo.c
+++ b/sys/dev/sound/pci/solo.c
@@ -1051,7 +1051,7 @@ ess_attach(device_t dev)
if (mixer_init(dev, &solomixer_class, sc))
goto no;
- snprintf(status, SND_STATUSLEN, "at io 0x%lx,0x%lx,0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx,0x%jx,0x%jx irq %jd %s",
rman_get_start(sc->io), rman_get_start(sc->sb), rman_get_start(sc->vc),
rman_get_start(sc->irq),PCM_KLDSTRING(snd_solo));
diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c
index ef48890..32ddd00 100644
--- a/sys/dev/sound/pci/t4dwave.c
+++ b/sys/dev/sound/pci/t4dwave.c
@@ -948,7 +948,7 @@ tr_pci_attach(device_t dev)
goto bad;
}
- snprintf(status, 64, "at io 0x%lx irq %ld %s",
+ snprintf(status, 64, "at io 0x%jx irq %jd %s",
rman_get_start(tr->reg), rman_get_start(tr->irq),PCM_KLDSTRING(snd_t4dwave));
if (pcm_register(dev, tr, dacn, 1))
diff --git a/sys/dev/sound/pci/via8233.c b/sys/dev/sound/pci/via8233.c
index 0694cef..45fe175 100644
--- a/sys/dev/sound/pci/via8233.c
+++ b/sys/dev/sound/pci/via8233.c
@@ -1348,7 +1348,7 @@ via_attach(device_t dev)
ac97_setextmode(via->codec, ext);
}
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s",
rman_get_start(via->reg), rman_get_start(via->irq),
PCM_KLDSTRING(snd_via8233));
diff --git a/sys/dev/sound/pci/via82c686.c b/sys/dev/sound/pci/via82c686.c
index 6b615e8..4484d6e 100644
--- a/sys/dev/sound/pci/via82c686.c
+++ b/sys/dev/sound/pci/via82c686.c
@@ -590,7 +590,7 @@ via_attach(device_t dev)
NSEGS * sizeof(struct via_dma_op), dma_cb, via, 0) != 0)
goto bad;
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s",
rman_get_start(via->reg), rman_get_start(via->irq),
PCM_KLDSTRING(snd_via82c686));
diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c
index f16e3ef..22c84c8 100644
--- a/sys/dev/sound/pci/vibes.c
+++ b/sys/dev/sound/pci/vibes.c
@@ -815,7 +815,7 @@ sv_attach(device_t dev) {
((mu - ml) % 0x200)) {
device_printf(dev, "sv_attach: resource assumptions not met "
"(midi 0x%08lx, games 0x%08lx)\n",
- midi_start, games_start);
+ (u_long)midi_start, (u_long)games_start);
goto fail;
}
@@ -874,7 +874,7 @@ sv_attach(device_t dev) {
pcm_addchan(dev, PCMDIR_PLAY, &svpchan_class, sc);
pcm_addchan(dev, PCMDIR_REC, &svrchan_class, sc);
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s",
rman_get_start(sc->enh_reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_vibes));
pcm_setstatus(dev, status);
OpenPOWER on IntegriCloud