summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-04-15 19:16:37 +0000
committerjhb <jhb@FreeBSD.org>2002-04-15 19:16:37 +0000
commit45c5bb7593086008b5aa0bc0233767688c1af148 (patch)
tree98ea6e9b48b6d1a4df5bf7ffe59601ea8421fdb7 /sys/dev
parent4ab1aeb8f11d968fb0aad7ce3a8bc7fa9000db34 (diff)
downloadFreeBSD-src-45c5bb7593086008b5aa0bc0233767688c1af148.zip
FreeBSD-src-45c5bb7593086008b5aa0bc0233767688c1af148.tar.gz
Use bus_addr_t instead of u_int for local variables that are derived from
the per-channel bus_addr_t offset. Also, cast the offset to (long long) and use %#llx instead of %#x to fix printf warnings on architectures where sizeof(bus_addr_t) != sizeof(int).
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/sound/pci/maestro.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/sound/pci/maestro.c b/sys/dev/sound/pci/maestro.c
index bf5f442..f1e1d8b 100644
--- a/sys/dev/sound/pci/maestro.c
+++ b/sys/dev/sound/pci/maestro.c
@@ -520,10 +520,10 @@ agg_init(struct agg_info* ess)
static void
aggch_start_dac(struct agg_chinfo *ch)
{
- u_int wpwa = APU_USE_SYSMEM | (ch->offset >> 9);
+ bus_addr_t wpwa = APU_USE_SYSMEM | (ch->offset >> 9);
u_int size = ch->parent->bufsz >> 1;
u_int speed = ch->speed;
- u_int offset = ch->offset >> 1;
+ bus_addr_t offset = ch->offset >> 1;
u_int cp = 0;
u_int16_t apuch = ch->num << 1;
u_int dv;
@@ -663,7 +663,7 @@ aggch_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c,
ch->offset = physaddr - ess->baseaddr;
if (physaddr < ess->baseaddr || ch->offset > WPWA_MAXADDR) {
device_printf(ess->dev,
- "offset %#x exceeds limit. ", ch->offset);
+ "offset %#llx exceeds limit. ", (long long)ch->offset);
dma_free(ess, sndbuf_getbuf(b));
return NULL;
}
@@ -673,9 +673,9 @@ aggch_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c,
if (dir == PCMDIR_PLAY) {
ess->playchns++;
if (bootverbose)
- device_printf(ess->dev, "pch[%d].offset = %#x\n", ch->num, ch->offset);
+ device_printf(ess->dev, "pch[%d].offset = %#llx\n", ch->num, (long long)ch->offset);
} else if (bootverbose)
- device_printf(ess->dev, "rch.offset = %#x\n", ch->offset);
+ device_printf(ess->dev, "rch.offset = %#llx\n", (long long)ch->offset);
return ch;
}
OpenPOWER on IntegriCloud