summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-08-24 00:22:10 +0000
committerbde <bde@FreeBSD.org>1999-08-24 00:22:10 +0000
commit50fccdce5e1c4fc0fbe5b921d8d1fc2823474a7b (patch)
tree5156b0cd715349a167e2c90aa09d85453fbaff99 /sys/amd64
parent9fe2430ab3679087009a43cac7c3af567c3c8099 (diff)
downloadFreeBSD-src-50fccdce5e1c4fc0fbe5b921d8d1fc2823474a7b.zip
FreeBSD-src-50fccdce5e1c4fc0fbe5b921d8d1fc2823474a7b.tar.gz
Fixed a misplaced cast to uintptr_t. Cosmetic.
Use device_get_nameunit() instead of rolling our own.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/legacy.c11
-rw-r--r--sys/amd64/amd64/nexus.c11
2 files changed, 8 insertions, 14 deletions
diff --git a/sys/amd64/amd64/legacy.c b/sys/amd64/amd64/legacy.c
index 35b7cd6..0c28185 100644
--- a/sys/amd64/amd64/legacy.c
+++ b/sys/amd64/amd64/legacy.c
@@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: nexus.c,v 1.14 1999/08/22 19:56:55 peter Exp $
+ * $Id: nexus.c,v 1.15 1999/08/23 19:23:33 peter Exp $
*/
/*
@@ -282,7 +282,7 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid,
/*
* The first 1Mb is mapped at KERNBASE.
*/
- vaddr = (caddr_t)((uintptr_t)KERNBASE + rv->r_start);
+ vaddr = (caddr_t)(uintptr_t)(KERNBASE + rv->r_start);
} else {
u_int32_t paddr;
u_int32_t psize;
@@ -351,7 +351,6 @@ nexus_setup_intr(device_t bus, device_t child, struct resource *irq,
intrmask_t *mask;
driver_t *driver;
int error, icflags;
- char name[32];
/* somebody tried to setup an irq that failed to allocate! */
if (irq == NULL)
@@ -395,10 +394,8 @@ nexus_setup_intr(device_t bus, device_t child, struct resource *irq,
if (error)
return (error);
- snprintf(name, sizeof(name), "%s%d", device_get_name(child),
- device_get_unit(child));
- *cookiep = inthand_add(name, irq->r_start, ihand, arg,
- mask, icflags);
+ *cookiep = inthand_add(device_get_nameunit(child), irq->r_start,
+ ihand, arg, mask, icflags);
if (*cookiep == NULL)
error = EINVAL; /* XXX ??? */
diff --git a/sys/amd64/amd64/nexus.c b/sys/amd64/amd64/nexus.c
index 35b7cd6..0c28185 100644
--- a/sys/amd64/amd64/nexus.c
+++ b/sys/amd64/amd64/nexus.c
@@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: nexus.c,v 1.14 1999/08/22 19:56:55 peter Exp $
+ * $Id: nexus.c,v 1.15 1999/08/23 19:23:33 peter Exp $
*/
/*
@@ -282,7 +282,7 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid,
/*
* The first 1Mb is mapped at KERNBASE.
*/
- vaddr = (caddr_t)((uintptr_t)KERNBASE + rv->r_start);
+ vaddr = (caddr_t)(uintptr_t)(KERNBASE + rv->r_start);
} else {
u_int32_t paddr;
u_int32_t psize;
@@ -351,7 +351,6 @@ nexus_setup_intr(device_t bus, device_t child, struct resource *irq,
intrmask_t *mask;
driver_t *driver;
int error, icflags;
- char name[32];
/* somebody tried to setup an irq that failed to allocate! */
if (irq == NULL)
@@ -395,10 +394,8 @@ nexus_setup_intr(device_t bus, device_t child, struct resource *irq,
if (error)
return (error);
- snprintf(name, sizeof(name), "%s%d", device_get_name(child),
- device_get_unit(child));
- *cookiep = inthand_add(name, irq->r_start, ihand, arg,
- mask, icflags);
+ *cookiep = inthand_add(device_get_nameunit(child), irq->r_start,
+ ihand, arg, mask, icflags);
if (*cookiep == NULL)
error = EINVAL; /* XXX ??? */
OpenPOWER on IntegriCloud