diff options
author | bde <bde@FreeBSD.org> | 1999-08-24 00:22:10 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-08-24 00:22:10 +0000 |
commit | 50fccdce5e1c4fc0fbe5b921d8d1fc2823474a7b (patch) | |
tree | 5156b0cd715349a167e2c90aa09d85453fbaff99 | |
parent | 9fe2430ab3679087009a43cac7c3af567c3c8099 (diff) | |
download | FreeBSD-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.
-rw-r--r-- | sys/amd64/amd64/legacy.c | 11 | ||||
-rw-r--r-- | sys/amd64/amd64/nexus.c | 11 | ||||
-rw-r--r-- | sys/i386/i386/legacy.c | 11 | ||||
-rw-r--r-- | sys/i386/i386/nexus.c | 11 |
4 files changed, 16 insertions, 28 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 ??? */ diff --git a/sys/i386/i386/legacy.c b/sys/i386/i386/legacy.c index 35b7cd6..0c28185 100644 --- a/sys/i386/i386/legacy.c +++ b/sys/i386/i386/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/i386/i386/nexus.c b/sys/i386/i386/nexus.c index 35b7cd6..0c28185 100644 --- a/sys/i386/i386/nexus.c +++ b/sys/i386/i386/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 ??? */ |