diff --git a/sys/sparc64/sbus/sbus.c b/sys/sparc64/sbus/sbus.c index 3d4e110faee2..705dcb662caa 100644 --- a/sys/sparc64/sbus/sbus.c +++ b/sys/sparc64/sbus/sbus.c @@ -375,7 +375,7 @@ sbus_probe(device_t dev) sc->sc_is.is_dva = SBR_IOMMU_SVADIAG; sc->sc_is.is_dtcmp = 0; sc->sc_is.is_sb[0] = SBR_STRBUF; - sc->sc_is.is_sb[1] = NULL; + sc->sc_is.is_sb[1] = 0; /* give us a nice name.. */ name = (char *)malloc(32, M_DEVBUF, M_NOWAIT); @@ -637,7 +637,7 @@ sbus_setup_intr(device_t dev, device_t child, sc = (struct sbus_softc *)device_get_softc(dev); scl = (struct sbus_clr *)malloc(sizeof(*scl), M_DEVBUF, M_NOWAIT); if (scl == NULL) - return (NULL); + return (0); intrptr = intrmapptr = intrclrptr = 0; intrmap = 0; inr = INTVEC(vec); @@ -774,7 +774,7 @@ sbus_alloc_resource(device_t bus, device_t child, int type, int *rid, rm = &sc->sc_rd[i].rd_rman; bh = sc->sc_rd[i].rd_bushandle; } - if (toffs == NULL) + if (toffs == 0L) return (NULL); flags &= ~RF_ACTIVE; rv = rman_reserve_resource(rm, toffs, tend, count, flags, diff --git a/sys/sparc64/sparc64/bus_machdep.c b/sys/sparc64/sparc64/bus_machdep.c index 59d413ae465c..47890c445ad7 100644 --- a/sys/sparc64/sparc64/bus_machdep.c +++ b/sys/sparc64/sparc64/bus_machdep.c @@ -725,10 +725,10 @@ sparc64_bus_mem_map(bus_space_tag_t tag, bus_space_handle_t handle, if (!(flags & BUS_SPACE_MAP_CACHEABLE)) pm_flags |= TD_E; - if (vaddr != NULL) + if (vaddr != 0L) sva = trunc_page(vaddr); else { - if ((sva = kmem_alloc_nofault(kernel_map, size)) == NULL) + if ((sva = kmem_alloc_nofault(kernel_map, size)) == 0) panic("sparc64_bus_map: cannot allocate virtual " "memory"); }