From 835cce6c240ae564002d49b83e20d1fceff82dd9 Mon Sep 17 00:00:00 2001 From: dfr Date: Fri, 24 Dec 1999 16:22:45 +0000 Subject: [PATCH] Don't pass u_int32_t pointers to BUS_READ_IVAR since it tends to make alphas panic. --- sys/dev/sound/isa/sb.c | 6 +++--- sys/dev/sound/isa/sb16.c | 6 +++--- sys/dev/sound/isa/sb8.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/dev/sound/isa/sb.c b/sys/dev/sound/isa/sb.c index 5eaa1f5abe56..734788e9eeb2 100644 --- a/sys/dev/sound/isa/sb.c +++ b/sys/dev/sound/isa/sb.c @@ -1082,7 +1082,7 @@ static int sbsbc_probe(device_t dev) { char buf[64]; - u_int32_t func, ver, r, f; + uintptr_t func, ver, r, f; /* The parent device has already been probed. */ r = BUS_READ_IVAR(device_get_parent(dev), dev, 0, &func); @@ -1092,7 +1092,7 @@ sbsbc_probe(device_t dev) r = BUS_READ_IVAR(device_get_parent(dev), dev, 1, &ver); f = (ver & 0xffff0000) >> 16; ver &= 0x0000ffff; - snprintf(buf, sizeof buf, "SB DSP %d.%02d%s%s", ver >> 8, ver & 0xff, + snprintf(buf, sizeof buf, "SB DSP %d.%02d%s%s", (int) ver >> 8, (int) ver & 0xff, (f & BD_F_ESS)? " (ESS mode)" : "", (f & BD_F_SB16X)? " (ViBRA16X)" : ""); device_set_desc_copy(dev, buf); @@ -1104,7 +1104,7 @@ static int sbsbc_attach(device_t dev) { struct sb_info *sb; - u_int32_t ver; + uintptr_t ver; sb = (struct sb_info *)malloc(sizeof *sb, M_DEVBUF, M_NOWAIT); if (!sb) return ENXIO; diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c index 5eaa1f5abe56..734788e9eeb2 100644 --- a/sys/dev/sound/isa/sb16.c +++ b/sys/dev/sound/isa/sb16.c @@ -1082,7 +1082,7 @@ static int sbsbc_probe(device_t dev) { char buf[64]; - u_int32_t func, ver, r, f; + uintptr_t func, ver, r, f; /* The parent device has already been probed. */ r = BUS_READ_IVAR(device_get_parent(dev), dev, 0, &func); @@ -1092,7 +1092,7 @@ sbsbc_probe(device_t dev) r = BUS_READ_IVAR(device_get_parent(dev), dev, 1, &ver); f = (ver & 0xffff0000) >> 16; ver &= 0x0000ffff; - snprintf(buf, sizeof buf, "SB DSP %d.%02d%s%s", ver >> 8, ver & 0xff, + snprintf(buf, sizeof buf, "SB DSP %d.%02d%s%s", (int) ver >> 8, (int) ver & 0xff, (f & BD_F_ESS)? " (ESS mode)" : "", (f & BD_F_SB16X)? " (ViBRA16X)" : ""); device_set_desc_copy(dev, buf); @@ -1104,7 +1104,7 @@ static int sbsbc_attach(device_t dev) { struct sb_info *sb; - u_int32_t ver; + uintptr_t ver; sb = (struct sb_info *)malloc(sizeof *sb, M_DEVBUF, M_NOWAIT); if (!sb) return ENXIO; diff --git a/sys/dev/sound/isa/sb8.c b/sys/dev/sound/isa/sb8.c index 5eaa1f5abe56..734788e9eeb2 100644 --- a/sys/dev/sound/isa/sb8.c +++ b/sys/dev/sound/isa/sb8.c @@ -1082,7 +1082,7 @@ static int sbsbc_probe(device_t dev) { char buf[64]; - u_int32_t func, ver, r, f; + uintptr_t func, ver, r, f; /* The parent device has already been probed. */ r = BUS_READ_IVAR(device_get_parent(dev), dev, 0, &func); @@ -1092,7 +1092,7 @@ sbsbc_probe(device_t dev) r = BUS_READ_IVAR(device_get_parent(dev), dev, 1, &ver); f = (ver & 0xffff0000) >> 16; ver &= 0x0000ffff; - snprintf(buf, sizeof buf, "SB DSP %d.%02d%s%s", ver >> 8, ver & 0xff, + snprintf(buf, sizeof buf, "SB DSP %d.%02d%s%s", (int) ver >> 8, (int) ver & 0xff, (f & BD_F_ESS)? " (ESS mode)" : "", (f & BD_F_SB16X)? " (ViBRA16X)" : ""); device_set_desc_copy(dev, buf); @@ -1104,7 +1104,7 @@ static int sbsbc_attach(device_t dev) { struct sb_info *sb; - u_int32_t ver; + uintptr_t ver; sb = (struct sb_info *)malloc(sizeof *sb, M_DEVBUF, M_NOWAIT); if (!sb) return ENXIO;