summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/bios.c6
-rw-r--r--sys/arch/amd64/amd64/sg_dma.c10
-rw-r--r--sys/arch/arm/xscale/pxa27x_udc.c4
-rw-r--r--sys/arch/arm/xscale/pxa2x0_mmc.c6
-rw-r--r--sys/arch/aviion/dev/if_le_syscon.c4
-rw-r--r--sys/arch/aviion/dev/oosiop_syscon.c4
-rw-r--r--sys/arch/aviion/dev/vme.c4
-rw-r--r--sys/arch/beagle/dev/gptimer.c4
-rw-r--r--sys/arch/hp300/hp300/wscons_machdep.c8
-rw-r--r--sys/arch/hppa/dev/astro.c4
-rw-r--r--sys/arch/hppa64/dev/astro.c4
-rw-r--r--sys/arch/i386/i386/bios.c6
-rw-r--r--sys/arch/i386/i386/sg_dma.c10
-rw-r--r--sys/arch/mac68k/dev/if_sn.c4
-rw-r--r--sys/arch/mips64/mips64/cpu.c4
-rw-r--r--sys/arch/mips64/mips64/sendsig.c4
-rw-r--r--sys/arch/mvme68k/dev/vme.c10
-rw-r--r--sys/arch/mvme68k/dev/vmel.c4
-rw-r--r--sys/arch/mvme68k/mvme68k/autoconf.c6
-rw-r--r--sys/arch/mvme88k/dev/mainbus.c14
-rw-r--r--sys/arch/mvme88k/dev/vme.c16
-rw-r--r--sys/arch/mvme88k/dev/vmel.c4
-rw-r--r--sys/arch/mvme88k/dev/vmes.c4
-rw-r--r--sys/arch/mvme88k/dev/vx.c8
-rw-r--r--sys/arch/sgi/dev/mkbc.c6
-rw-r--r--sys/arch/sgi/sgi/sginode.c4
-rw-r--r--sys/arch/sparc/include/bus.h5
-rw-r--r--sys/arch/sparc/sparc/machdep.c4
-rw-r--r--sys/arch/sparc/sparc/vm_machdep.c8
-rw-r--r--sys/arch/sparc64/dev/fb.c6
-rw-r--r--sys/arch/sparc64/dev/fhc.c4
-rw-r--r--sys/arch/sparc64/dev/iommu.c8
-rw-r--r--sys/arch/sparc64/dev/uperf.c6
-rw-r--r--sys/arch/sparc64/dev/viommu.c4
-rw-r--r--sys/arch/sparc64/sparc64/autoconf.c6
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c6
-rw-r--r--sys/arch/sparc64/sparc64/pmap.c24
-rw-r--r--sys/arch/vax/mbus/mbus.c6
-rw-r--r--sys/arch/vax/mbus/uba_mbus.c4
-rw-r--r--sys/arch/vax/vsa/lcg.c4
40 files changed, 128 insertions, 129 deletions
diff --git a/sys/arch/amd64/amd64/bios.c b/sys/arch/amd64/amd64/bios.c
index 8ead81728dd..dd73d9a58c4 100644
--- a/sys/arch/amd64/amd64/bios.c
+++ b/sys/arch/amd64/amd64/bios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bios.c,v 1.20 2010/04/20 22:05:41 tedu Exp $ */
+/* $OpenBSD: bios.c,v 1.21 2011/04/07 15:30:13 miod Exp $ */
/*
* Copyright (c) 2006 Gordon Willem Klok <gklok@cogeco.ca>
*
@@ -218,7 +218,7 @@ smbios_find_table(u_int8_t type, struct smbtable *st)
if (hdr->type == type) {
va = (u_int8_t *)hdr + hdr->size;
for (; va + 1 < end; va++)
- if (*va == NULL && *(va + 1) == NULL)
+ if (*va == 0 && *(va + 1) == 0)
break;
va+= 2;
tcount = st->cookie >> 16;
@@ -239,7 +239,7 @@ smbios_find_table(u_int8_t type, struct smbtable *st)
break;
va+= hdr->size;
for (; va + 1 < end; va++)
- if (*va == NULL && *(va + 1) == NULL)
+ if (*va == 0 && *(va + 1) == 0)
break;
va+=2;
}
diff --git a/sys/arch/amd64/amd64/sg_dma.c b/sys/arch/amd64/amd64/sg_dma.c
index c66e27dc2ae..67d6eee4659 100644
--- a/sys/arch/amd64/amd64/sg_dma.c
+++ b/sys/arch/amd64/amd64/sg_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sg_dma.c,v 1.9 2010/04/20 23:12:01 phessler Exp $ */
+/* $OpenBSD: sg_dma.c,v 1.10 2011/04/07 15:30:13 miod Exp $ */
/*
* Copyright (c) 2009 Owain G. Ainsworth <oga@openbsd.org>
*
@@ -91,7 +91,7 @@ sg_dmatag_init(char *name, void *hdl, bus_addr_t start, bus_size_t size,
return (NULL);
cookie->sg_ex = extent_create(name, start, start + size - 1,
- M_DEVBUF, NULL, NULL, EX_NOWAIT | EX_NOCOALESCE);
+ M_DEVBUF, NULL, 0, EX_NOWAIT | EX_NOCOALESCE);
if (cookie->sg_ex == NULL) {
free(cookie, M_DEVBUF);
return (NULL);
@@ -604,7 +604,7 @@ sg_dmamap_append_range(bus_dma_tag_t t, bus_dmamap_t map, paddr_t pa,
sgend = sgstart + length - 1;
#ifdef DIAGNOSTIC
- if (sgstart == NULL || sgstart > sgend) {
+ if (sgstart == 0 || sgstart > sgend) {
printf("append range invalid mapping for %lx "
"(0x%llx - 0x%llx)\n", pa, sgstart, sgend);
map->dm_nsegs = 0;
@@ -876,7 +876,7 @@ sg_iomap_insert_page(struct sg_page_map *spm, paddr_t pa)
e = &spm->spm_map[spm->spm_pagecnt];
e->spe_pa = pa;
- e->spe_va = NULL;
+ e->spe_va = 0;
e = SPLAY_INSERT(sg_page_tree, &spm->spm_tree, e);
@@ -937,7 +937,7 @@ sg_iomap_translate(struct sg_page_map *spm, paddr_t pa)
e = SPLAY_FIND(sg_page_tree, &spm->spm_tree, &pe);
if (e == NULL)
- return (NULL);
+ return (bus_addr_t)0;
return (e->spe_va | offset);
}
diff --git a/sys/arch/arm/xscale/pxa27x_udc.c b/sys/arch/arm/xscale/pxa27x_udc.c
index 23a06d39a6f..e606e3f4147 100644
--- a/sys/arch/arm/xscale/pxa27x_udc.c
+++ b/sys/arch/arm/xscale/pxa27x_udc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa27x_udc.c,v 1.27 2010/09/07 16:21:35 deraadt Exp $ */
+/* $OpenBSD: pxa27x_udc.c,v 1.28 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 2007 Dale Rahn <drahn@openbsd.org>
@@ -193,7 +193,7 @@ pxaudc_attach(struct pxaudc_softc *sc, void *aux)
printf(": unable to establish connect interrupt\n");
pxa2x0_intr_disestablish(sc->sc_ih);
bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_size);
- sc->sc_ioh = NULL;
+ sc->sc_ioh = 0;
sc->sc_size = 0;
return;
}
diff --git a/sys/arch/arm/xscale/pxa2x0_mmc.c b/sys/arch/arm/xscale/pxa2x0_mmc.c
index b8be421d9d4..6451c19677e 100644
--- a/sys/arch/arm/xscale/pxa2x0_mmc.c
+++ b/sys/arch/arm/xscale/pxa2x0_mmc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_mmc.c,v 1.9 2009/09/03 21:40:29 marex Exp $ */
+/* $OpenBSD: pxa2x0_mmc.c,v 1.10 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 2007 Uwe Stuehler <uwe@openbsd.org>
@@ -203,9 +203,9 @@ fail:
pxa2x0_gpio_intr_disestablish(sc->sc_card_ih);
sc->sc_card_ih = NULL;
}
- if (sc->sc_ioh != NULL) {
+ if (sc->sc_ioh != 0) {
bus_space_unmap(sc->sc_iot, sc->sc_ioh, PXA2X0_MMC_SIZE);
- sc->sc_ioh = NULL;
+ sc->sc_ioh = 0;
}
pxa2x0_clkman_config(CKEN_MMC, 0);
}
diff --git a/sys/arch/aviion/dev/if_le_syscon.c b/sys/arch/aviion/dev/if_le_syscon.c
index 078126b77b9..5c19dfdf4c3 100644
--- a/sys/arch/aviion/dev/if_le_syscon.c
+++ b/sys/arch/aviion/dev/if_le_syscon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le_syscon.c,v 1.11 2010/12/31 21:38:07 miod Exp $ */
+/* $OpenBSD: if_le_syscon.c,v 1.12 2011/04/07 15:30:15 miod Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -145,7 +145,7 @@ le_syscon_attach(struct device *parent, struct device *self, void *aux)
}
va = uvm_km_valloc(kernel_map, ptoa(etherpages));
- if (va == NULL) {
+ if (va == 0) {
printf(": can't map descriptor memory\n");
uvm_pglistfree(&pglist);
return;
diff --git a/sys/arch/aviion/dev/oosiop_syscon.c b/sys/arch/aviion/dev/oosiop_syscon.c
index 8fd04b27191..e2ec0f46ce0 100644
--- a/sys/arch/aviion/dev/oosiop_syscon.c
+++ b/sys/arch/aviion/dev/oosiop_syscon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: oosiop_syscon.c,v 1.3 2010/04/24 18:44:27 miod Exp $ */
+/* $OpenBSD: oosiop_syscon.c,v 1.4 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
@@ -95,7 +95,7 @@ oosiop_syscon_attach(struct device *parent, struct device *self, void *aux)
}
sc->sc_bst = ca->ca_iot;
sc->sc_bsh = ioh;
- sc->sc_dmat = NULL; /* no real use of tag yet */
+ sc->sc_dmat = 0; /* no real use of tag yet */
sc->sc_freq = 33333333; /* XXX 25MHz models? */
sc->sc_chip = OOSIOP_700;
diff --git a/sys/arch/aviion/dev/vme.c b/sys/arch/aviion/dev/vme.c
index 88b982fd082..4c82e2dc31e 100644
--- a/sys/arch/aviion/dev/vme.c
+++ b/sys/arch/aviion/dev/vme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vme.c,v 1.11 2010/12/31 21:38:08 miod Exp $ */
+/* $OpenBSD: vme.c,v 1.12 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 2006, 2007, 2010 Miodrag Vallat.
*
@@ -497,7 +497,7 @@ vme_map_r(const struct vme_range *r, paddr_t pa, psize_t len, int flags,
u_int pg;
ova = va = uvm_km_valloc(kernel_map, len);
- if (va == NULL)
+ if (va == 0)
return ENOMEM;
pa += r->vr_base;
diff --git a/sys/arch/beagle/dev/gptimer.c b/sys/arch/beagle/dev/gptimer.c
index a3afbb62209..8e5ae8c26e1 100644
--- a/sys/arch/beagle/dev/gptimer.c
+++ b/sys/arch/beagle/dev/gptimer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gptimer.c,v 1.4 2010/08/07 03:50:01 krw Exp $ */
+/* $OpenBSD: gptimer.c,v 1.5 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -391,7 +391,7 @@ delay(u_int usecs)
for (j = 100; j > 0; j--)
;
- if (gptimer_ioh1 == NULL) {
+ if (gptimer_ioh1 == 0) {
/* BAH */
for (; usecs > 0; usecs--)
for (j = 100; j > 0; j--)
diff --git a/sys/arch/hp300/hp300/wscons_machdep.c b/sys/arch/hp300/hp300/wscons_machdep.c
index 5b4617e61ef..2e67b116217 100644
--- a/sys/arch/hp300/hp300/wscons_machdep.c
+++ b/sys/arch/hp300/hp300/wscons_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wscons_machdep.c,v 1.10 2010/04/15 20:38:11 miod Exp $ */
+/* $OpenBSD: wscons_machdep.c,v 1.11 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat
@@ -221,7 +221,7 @@ wscnprobe(struct consdev *cp)
/* Map current PA. */
pa = (paddr_t)dio_scodetopa(scode);
va = (vaddr_t)iomap((caddr_t)pa, PAGE_SIZE);
- if (va == NULL)
+ if (va == 0)
continue;
/* Check to see if hardware exists. */
@@ -237,7 +237,7 @@ wscnprobe(struct consdev *cp)
mapsize = DIO_SIZE(scode, va);
iounmap((caddr_t)va, PAGE_SIZE);
va = (vaddr_t)iomap((caddr_t)pa, mapsize);
- if (va == NULL)
+ if (va == 0)
continue;
goto found;
} else
@@ -255,7 +255,7 @@ wscnprobe(struct consdev *cp)
/* Map current PA. */
pa = (paddr_t)sgc_slottopa(scode);
va = (vaddr_t)iomap((caddr_t)pa, PAGE_SIZE);
- if (va == NULL)
+ if (va == 0)
continue;
/* Check to see if hardware exists. */
diff --git a/sys/arch/hppa/dev/astro.c b/sys/arch/hppa/dev/astro.c
index 89fd4c56eae..afe811c9b21 100644
--- a/sys/arch/hppa/dev/astro.c
+++ b/sys/arch/hppa/dev/astro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: astro.c,v 1.12 2010/08/07 03:50:01 krw Exp $ */
+/* $OpenBSD: astro.c,v 1.13 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 2007 Mark Kettenis
@@ -640,7 +640,7 @@ iommu_iomap_insert_page(struct iommu_map_state *ims, vaddr_t va, paddr_t pa)
e->ipe_pa = pa;
e->ipe_va = va;
- e->ipe_dva = NULL;
+ e->ipe_dva = 0;
e = SPLAY_INSERT(iommu_page_tree, &ipm->ipm_tree, e);
diff --git a/sys/arch/hppa64/dev/astro.c b/sys/arch/hppa64/dev/astro.c
index dc7e41cd8d4..d6a5b4572c7 100644
--- a/sys/arch/hppa64/dev/astro.c
+++ b/sys/arch/hppa64/dev/astro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: astro.c,v 1.4 2010/08/07 03:50:01 krw Exp $ */
+/* $OpenBSD: astro.c,v 1.5 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 2007 Mark Kettenis
@@ -640,7 +640,7 @@ iommu_iomap_insert_page(struct iommu_map_state *ims, vaddr_t va, paddr_t pa)
e->ipe_pa = pa;
e->ipe_va = va;
- e->ipe_dva = NULL;
+ e->ipe_dva = 0;
e = SPLAY_INSERT(iommu_page_tree, &ipm->ipm_tree, e);
diff --git a/sys/arch/i386/i386/bios.c b/sys/arch/i386/i386/bios.c
index 0d1468ca79b..ff2c92a7291 100644
--- a/sys/arch/i386/i386/bios.c
+++ b/sys/arch/i386/i386/bios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bios.c,v 1.88 2010/11/22 21:08:07 miod Exp $ */
+/* $OpenBSD: bios.c,v 1.89 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 1997-2001 Michael Shalayeff
@@ -756,7 +756,7 @@ smbios_find_table(u_int8_t type, struct smbtable *st)
if (hdr->type == type) {
va = (u_int8_t *)hdr + hdr->size;
for (; va + 1 < end; va++)
- if (*va == NULL && *(va + 1) == NULL)
+ if (*va == 0 && *(va + 1) == 0)
break;
va+= 2;
tcount = st->cookie >> 16;
@@ -777,7 +777,7 @@ smbios_find_table(u_int8_t type, struct smbtable *st)
break;
va+= hdr->size;
for (; va + 1 < end; va++)
- if (*va == NULL && *(va + 1) == NULL)
+ if (*va == 0 && *(va + 1) == 0)
break;
va+=2;
}
diff --git a/sys/arch/i386/i386/sg_dma.c b/sys/arch/i386/i386/sg_dma.c
index 9f924258ebe..1f45bf21c83 100644
--- a/sys/arch/i386/i386/sg_dma.c
+++ b/sys/arch/i386/i386/sg_dma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sg_dma.c,v 1.6 2010/04/20 22:05:41 tedu Exp $ */
+/* $OpenBSD: sg_dma.c,v 1.7 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 2009 Owain G. Ainsworth <oga@openbsd.org>
*
@@ -91,7 +91,7 @@ sg_dmatag_init(char *name, void *hdl, bus_addr_t start, bus_size_t size,
return (NULL);
cookie->sg_ex = extent_create(name, start, start + size - 1,
- M_DEVBUF, NULL, NULL, EX_NOWAIT | EX_NOCOALESCE);
+ M_DEVBUF, NULL, 0, EX_NOWAIT | EX_NOCOALESCE);
if (cookie->sg_ex == NULL) {
free(cookie, M_DEVBUF);
return (NULL);
@@ -604,7 +604,7 @@ sg_dmamap_append_range(bus_dma_tag_t t, bus_dmamap_t map, paddr_t pa,
sgend = sgstart + length - 1;
#ifdef DIAGNOSTIC
- if (sgstart == NULL || sgstart > sgend) {
+ if (sgstart == 0 || sgstart > sgend) {
printf("append range invalid mapping for %lx "
"(0x%llx - 0x%llx)\n", pa, sgstart, sgend);
map->dm_nsegs = 0;
@@ -876,7 +876,7 @@ sg_iomap_insert_page(struct sg_page_map *spm, paddr_t pa)
e = &spm->spm_map[spm->spm_pagecnt];
e->spe_pa = pa;
- e->spe_va = NULL;
+ e->spe_va = 0;
e = SPLAY_INSERT(sg_page_tree, &spm->spm_tree, e);
@@ -937,7 +937,7 @@ sg_iomap_translate(struct sg_page_map *spm, paddr_t pa)
e = SPLAY_FIND(sg_page_tree, &spm->spm_tree, &pe);
if (e == NULL)
- return (NULL);
+ return (0);
return (e->spe_va | offset);
}
diff --git a/sys/arch/mac68k/dev/if_sn.c b/sys/arch/mac68k/dev/if_sn.c
index b60fbe50eb0..4a3bf5a08e5 100644
--- a/sys/arch/mac68k/dev/if_sn.c
+++ b/sys/arch/mac68k/dev/if_sn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sn.c,v 1.54 2010/03/31 19:46:27 miod Exp $ */
+/* $OpenBSD: if_sn.c,v 1.55 2011/04/07 15:30:15 miod Exp $ */
/* $NetBSD: if_sn.c,v 1.13 1997/04/25 03:40:10 briggs Exp $ */
/*
@@ -124,7 +124,7 @@ snsetup(struct sn_softc *sc, u_int8_t *lladdr)
* Map the pages uncached.
*/
sc->space = uvm_km_valloc(kernel_map, SN_NPAGES * PAGE_SIZE);
- if (sc->space == NULL) {
+ if (sc->space == 0) {
printf(": can't map descriptor memory\n");
uvm_pglistfree(&pglist);
return (ENOMEM);
diff --git a/sys/arch/mips64/mips64/cpu.c b/sys/arch/mips64/mips64/cpu.c
index 863d261bc9c..b01259b5845 100644
--- a/sys/arch/mips64/mips64/cpu.c
+++ b/sys/arch/mips64/mips64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.37 2011/03/31 20:37:44 miod Exp $ */
+/* $OpenBSD: cpu.c,v 1.38 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 1997-2004 Opsycon AB (www.opsycon.se)
@@ -55,7 +55,7 @@ struct cfattach cpu_ca = {
sizeof(struct device), cpumatch, cpuattach
};
struct cfdriver cpu_cd = {
- NULL, "cpu", DV_DULL, NULL, 0
+ NULL, "cpu", DV_DULL,
};
int
diff --git a/sys/arch/mips64/mips64/sendsig.c b/sys/arch/mips64/mips64/sendsig.c
index 0ad5276b1c8..21b925b71e2 100644
--- a/sys/arch/mips64/mips64/sendsig.c
+++ b/sys/arch/mips64/mips64/sendsig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sendsig.c,v 1.13 2010/06/26 23:24:43 guenther Exp $ */
+/* $OpenBSD: sendsig.c,v 1.14 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@@ -184,7 +184,7 @@ bail:
* Build the argument list for the signal handler.
*/
regs->a0 = sig;
- regs->a1 = (psp->ps_siginfo & sigmask(sig)) ? (register_t)&fp->sf_si : NULL;
+ regs->a1 = (psp->ps_siginfo & sigmask(sig)) ? (register_t)&fp->sf_si : 0;
regs->a2 = (register_t)&fp->sf_sc;
regs->a3 = (register_t)catcher;
diff --git a/sys/arch/mvme68k/dev/vme.c b/sys/arch/mvme68k/dev/vme.c
index 73f0d830a16..bfdeea0de8c 100644
--- a/sys/arch/mvme68k/dev/vme.c
+++ b/sys/arch/mvme68k/dev/vme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vme.c,v 1.29 2010/06/27 22:04:03 miod Exp $ */
+/* $OpenBSD: vme.c,v 1.30 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -113,7 +113,7 @@ vme_map(bus_addr_t addr, bus_size_t size, int flags, bus_space_handle_t *ret)
vaddr_t map;
map = (vaddr_t)mapiodev((paddr_t)addr, size);
- if (map == NULL)
+ if (map == 0)
return ENOMEM;
*ret = (bus_space_handle_t)map;
@@ -633,14 +633,14 @@ vme2chip_map(base, len, dwidth)
case 16:
if (base < VME2_D16STARTPHYS ||
base + (u_long)len > VME2_D16ENDPHYS)
- return (NULL);
+ return (0);
return (base);
case 32:
if (base < VME2_D32STARTVME)
- return (NULL);
+ return (0);
return (base - VME2_D32STARTVME + VME2_D32STARTPHYS);
default:
- return (NULL);
+ return (0);
}
}
diff --git a/sys/arch/mvme68k/dev/vmel.c b/sys/arch/mvme68k/dev/vmel.c
index 4ea722eb156..8ca896d0bd6 100644
--- a/sys/arch/mvme68k/dev/vmel.c
+++ b/sys/arch/mvme68k/dev/vmel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmel.c,v 1.17 2010/12/26 15:40:59 miod Exp $ */
+/* $OpenBSD: vmel.c,v 1.18 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -169,7 +169,7 @@ vmelmmap(dev, off, prot)
#ifdef DEBUG
printf("vmel %llx pa %p\n", off, pa);
#endif
- if (pa == NULL)
+ if (pa == 0)
return (-1);
return (pa);
}
diff --git a/sys/arch/mvme68k/mvme68k/autoconf.c b/sys/arch/mvme68k/mvme68k/autoconf.c
index 135279a528b..b9267d142ff 100644
--- a/sys/arch/mvme68k/mvme68k/autoconf.c
+++ b/sys/arch/mvme68k/mvme68k/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.46 2010/11/18 21:13:19 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.47 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -148,7 +148,7 @@ mapiodev(pa, size)
vaddr_t va, iova;
if (size <= 0)
- return NULL;
+ return 0;
base = pa & PAGE_MASK;
pa = trunc_page(pa);
@@ -158,7 +158,7 @@ mapiodev(pa, size)
EX_NOWAIT | EX_MALLOCOK, &iova);
if (error != 0)
- return NULL;
+ return 0;
va = iova;
while (size != 0) {
diff --git a/sys/arch/mvme88k/dev/mainbus.c b/sys/arch/mvme88k/dev/mainbus.c
index 8e74b5cc56d..1d805faeeb1 100644
--- a/sys/arch/mvme88k/dev/mainbus.c
+++ b/sys/arch/mvme88k/dev/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.25 2010/12/23 20:05:08 miod Exp $ */
+/* $OpenBSD: mainbus.c,v 1.26 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 2004, Miodrag Vallat.
@@ -95,7 +95,7 @@ mainbus_map(bus_addr_t addr, bus_size_t size, int flags,
vaddr_t map;
map = mapiodev((paddr_t)addr, size);
- if (map == NULL)
+ if (map == 0)
return ENOMEM;
*ret = (bus_space_handle_t)map;
@@ -140,11 +140,11 @@ mapiodev(paddr_t addr, int _size)
/* sanity checks */
if (_size <= 0)
- return NULL;
+ return 0;
size = (psize_t)_size;
epa = addr + size;
if (epa < addr && epa != 0)
- return NULL;
+ return 0;
/* check for 1:1 mapping */
if (addr >= bs_obio_start) {
@@ -152,7 +152,7 @@ mapiodev(paddr_t addr, int _size)
return ((vaddr_t)addr);
else if (addr <= bs_obio_end)
/* across obio and non-obio, not supported */
- return NULL;
+ return 0;
}
pa = trunc_page(addr);
@@ -165,13 +165,13 @@ mapiodev(paddr_t addr, int _size)
splx(s);
if (error != 0)
- return NULL;
+ return 0;
va = uvm_km_valloc(kernel_map, size);
if (va == 0) {
extent_free(bs_extent, atop(pa), atop(size),
EX_MALLOCOK | (cold ? 0 : EX_WAITSPACE));
- return NULL;
+ return 0;
}
iova = va + off;
diff --git a/sys/arch/mvme88k/dev/vme.c b/sys/arch/mvme88k/dev/vme.c
index 90841c91719..466d5ba4038 100644
--- a/sys/arch/mvme88k/dev/vme.c
+++ b/sys/arch/mvme88k/dev/vme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vme.c,v 1.49 2009/02/17 21:03:21 miod Exp $ */
+/* $OpenBSD: vme.c,v 1.50 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -366,7 +366,7 @@ vmepmap(sc, vmeaddr, bustype)
break;
#endif
default:
- return NULL;
+ return 0;
}
return (base);
}
@@ -381,8 +381,8 @@ vmemap(struct vmesoftc *sc, off_t vmeaddr)
paddr_t pa;
pa = vmepmap((struct device *)sc, vmeaddr, BUS_VMES);
- if (pa == NULL)
- return (NULL);
+ if (pa == 0)
+ return (0);
return mapiodev(pa, PAGE_SIZE);
}
@@ -422,7 +422,7 @@ vmerw(sc, uio, flags, bus)
if (c == 0)
return 0;
vme = vmemap((struct vmesoftc *)sc, v & ~PGOFSET);
- if (vme == NULL)
+ if (vme == 0)
return EACCES;
error = uiomove((void *)vme + (v & PGOFSET), c, uio);
vmeunmap(vme);
@@ -626,15 +626,15 @@ vme2chip_map(base, dwidth)
case 16:
if (base < VME2_D16STARTPHYS ||
base + PAGE_SIZE > VME2_D16ENDPHYS)
- return NULL;
+ return 0;
break;
case 32:
if (base < VME2_D32STARTPHYS ||
base + PAGE_SIZE > VME2_D32ENDPHYS)
- return NULL;
+ return 0;
break;
default:
- return NULL;
+ return 0;
}
return base;
}
diff --git a/sys/arch/mvme88k/dev/vmel.c b/sys/arch/mvme88k/dev/vmel.c
index c7138828ceb..2516266d254 100644
--- a/sys/arch/mvme88k/dev/vmel.c
+++ b/sys/arch/mvme88k/dev/vmel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmel.c,v 1.19 2010/12/26 15:40:59 miod Exp $ */
+/* $OpenBSD: vmel.c,v 1.20 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -164,7 +164,7 @@ vmelmmap(dev, off, prot)
#ifdef DEBUG
printf("vmel %llx pa %p\n", off, pa);
#endif
- if (pa == NULL)
+ if (pa == 0)
return (-1);
return (pa);
}
diff --git a/sys/arch/mvme88k/dev/vmes.c b/sys/arch/mvme88k/dev/vmes.c
index 80bbe54b52c..431751c911f 100644
--- a/sys/arch/mvme88k/dev/vmes.c
+++ b/sys/arch/mvme88k/dev/vmes.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmes.c,v 1.22 2010/12/26 15:40:59 miod Exp $ */
+/* $OpenBSD: vmes.c,v 1.23 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -169,7 +169,7 @@ vmesmmap(dev, off, prot)
#ifdef DEBUG
printf("vmes %llx pa %p\n", off, pa);
#endif
- if (pa == NULL)
+ if (pa == 0)
return (-1);
return (pa);
}
diff --git a/sys/arch/mvme88k/dev/vx.c b/sys/arch/mvme88k/dev/vx.c
index 6a8f1dc5abf..406b67abfd4 100644
--- a/sys/arch/mvme88k/dev/vx.c
+++ b/sys/arch/mvme88k/dev/vx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vx.c,v 1.42 2010/06/28 14:13:29 deraadt Exp $ */
+/* $OpenBSD: vx.c,v 1.43 2011/04/07 15:30:15 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* All rights reserved.
@@ -1133,10 +1133,10 @@ create_free_queue(struct vxsoftc *sc)
for (i = 1; i <= NENVELOPES; i++) {
bzero(&env, sizeof(struct envelope));
if (i == NENVELOPES)
- env.link = NULL;
+ env.link = 0;
else
env.link = ENVELOPE_AREA + i * sizeof(struct envelope);
- env.packet_ptr = NULL;
+ env.packet_ptr = 0;
env.valid_flag = 0;
d16_bcopy(&env, envp, sizeof(struct envelope));
envp++;
@@ -1148,7 +1148,7 @@ create_free_queue(struct vxsoftc *sc)
for (i = 1; i <= NPACKETS; i++) {
bzero(&pkt, sizeof(struct packet));
if (i == NPACKETS)
- pkt.link = NULL;
+ pkt.link = 0;
else
pkt.link = PACKET_AREA + i * sizeof(struct packet);
d16_bcopy(&pkt, pktp, sizeof(struct packet));
diff --git a/sys/arch/sgi/dev/mkbc.c b/sys/arch/sgi/dev/mkbc.c
index a4878ef000d..71576b9ca53 100644
--- a/sys/arch/sgi/dev/mkbc.c
+++ b/sys/arch/sgi/dev/mkbc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkbc.c,v 1.10 2010/12/03 18:29:56 shadchin Exp $ */
+/* $OpenBSD: mkbc.c,v 1.11 2011/04/07 15:30:16 miod Exp $ */
/*
* Copyright (c) 2006, 2007, Joel Sing
@@ -267,8 +267,8 @@ mkbc_attach(struct device *parent, struct device *self, void *aux)
t = malloc(sizeof(struct pckbc_internal), M_DEVBUF,
M_WAITOK | M_ZERO);
t->t_iot = msc->iot;
- t->t_ioh_d = NULL;
- t->t_ioh_c = NULL;
+ t->t_ioh_d = 0;
+ t->t_ioh_c = 0;
t->t_addr = maa->maa_baseaddr;
t->t_sc = (struct pckbc_softc *)msc;
sc->id = t;
diff --git a/sys/arch/sgi/sgi/sginode.c b/sys/arch/sgi/sgi/sginode.c
index 2c3a450794b..0d5fe0cb4b6 100644
--- a/sys/arch/sgi/sgi/sginode.c
+++ b/sys/arch/sgi/sgi/sginode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sginode.c,v 1.21 2011/04/03 22:34:54 miod Exp $ */
+/* $OpenBSD: sginode.c,v 1.22 2011/04/07 15:30:16 miod Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
*
@@ -406,7 +406,7 @@ kl_scan_node(int nasid, uint clss, int (*cb)(lboard_t *, void *), void *cbarg)
if ((*cb)(boardinfo, cbarg) != 0)
return 1;
}
- if (boardinfo->brd_next == NULL)
+ if (boardinfo->brd_next == 0)
break;
}
diff --git a/sys/arch/sparc/include/bus.h b/sys/arch/sparc/include/bus.h
index cbf3f0f63f0..bd3999c5697 100644
--- a/sys/arch/sparc/include/bus.h
+++ b/sys/arch/sparc/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.11 2011/03/23 16:54:37 pirofti Exp $ */
+/* $OpenBSD: bus.h,v 1.12 2011/04/07 15:30:16 miod Exp $ */
/*
* Copyright (c) 2003, Miodrag Vallat.
*
@@ -90,8 +90,7 @@ static __inline__ int
bus_space_map(bus_space_tag_t tag, bus_addr_t addr, bus_size_t size, int flags,
bus_space_handle_t *handle)
{
- if ((*handle = (bus_space_handle_t)mapiodev(tag,
- addr, size)) != NULL)
+ if ((*handle = (bus_space_handle_t)mapiodev(tag, addr, size)) != 0)
return (0);
return (ENOMEM);
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 5b0239fa0cf..d0f7f23502d 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.131 2010/11/27 19:41:48 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.132 2011/04/07 15:30:16 miod Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -831,7 +831,7 @@ mapdev(phys, virt, offset, size)
static vaddr_t iobase;
unsigned int pmtype;
- if (iobase == NULL)
+ if (iobase == 0)
iobase = IODEV_BASE;
base = (paddr_t)phys->rr_paddr + offset;
diff --git a/sys/arch/sparc/sparc/vm_machdep.c b/sys/arch/sparc/sparc/vm_machdep.c
index 912be7ddf40..80b24f37955 100644
--- a/sys/arch/sparc/sparc/vm_machdep.c
+++ b/sys/arch/sparc/sparc/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.53 2010/06/29 21:26:12 miod Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.54 2011/04/07 15:30:16 miod Exp $ */
/* $NetBSD: vm_machdep.c,v 1.30 1997/03/10 23:55:40 pk Exp $ */
/*
@@ -96,7 +96,7 @@ dvma_malloc_space(len, kaddr, flags, space)
len = round_page(len);
kva = (vaddr_t)malloc(len, M_DEVBUF, flags);
- if (kva == NULL)
+ if (kva == 0)
return (NULL);
#if defined(SUN4M)
@@ -106,7 +106,7 @@ dvma_malloc_space(len, kaddr, flags, space)
*(vaddr_t *)kaddr = kva;
dva = dvma_mapin_space(kernel_map, kva, len, (flags & M_NOWAIT) ? 0 : 1, space);
- if (dva == NULL) {
+ if (dva == 0) {
free((void *)kva, M_DEVBUF);
return (NULL);
}
@@ -180,7 +180,7 @@ dvma_mapin_space(map, va, len, canwait, space)
canwait ? EX_WAITSPACE : EX_NOWAIT, &tva);
splx(s);
if (error)
- return NULL;
+ return 0;
kva = tva;
while (npf--) {
diff --git a/sys/arch/sparc64/dev/fb.c b/sys/arch/sparc64/dev/fb.c
index f823e887d4b..e947e23391c 100644
--- a/sys/arch/sparc64/dev/fb.c
+++ b/sys/arch/sparc64/dev/fb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fb.c,v 1.22 2009/06/03 20:17:48 kettenis Exp $ */
+/* $OpenBSD: fb.c,v 1.23 2011/04/07 15:30:16 miod Exp $ */
/* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */
/*
@@ -474,8 +474,8 @@ fb_get_console_metrics(int *fontwidth, int *fontheight, int *wtop, int *wleft)
"addr window-top addr window-left",
4, &windowleft, &windowtop, &romwidth, &romheight);
- if (romheight == NULL || romwidth == NULL ||
- windowtop == NULL || windowleft == NULL)
+ if (romheight == 0 || romwidth == 0 ||
+ windowtop == 0 || windowleft == 0)
return (1);
*fontwidth = (int)*(uint64_t *)romwidth;
diff --git a/sys/arch/sparc64/dev/fhc.c b/sys/arch/sparc64/dev/fhc.c
index 1006bce15a5..46abed25a34 100644
--- a/sys/arch/sparc64/dev/fhc.c
+++ b/sys/arch/sparc64/dev/fhc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fhc.c,v 1.17 2010/11/11 17:58:23 miod Exp $ */
+/* $OpenBSD: fhc.c,v 1.18 2011/04/07 15:30:16 miod Exp $ */
/*
* Copyright (c) 2004 Jason L. Wright (jason@thought.net)
@@ -121,7 +121,7 @@ fhc_attach(struct fhc_softc *sc)
free(fa.fa_name, M_DEVBUF);
if (fa.fa_reg != NULL)
free(fa.fa_reg, M_DEVBUF);
- if (fa.fa_nintr != NULL)
+ if (fa.fa_intr != NULL)
free(fa.fa_intr, M_DEVBUF);
if (fa.fa_promvaddrs != NULL)
free(fa.fa_promvaddrs, M_DEVBUF);
diff --git a/sys/arch/sparc64/dev/iommu.c b/sys/arch/sparc64/dev/iommu.c
index a0a1baae8ac..52837d17d0b 100644
--- a/sys/arch/sparc64/dev/iommu.c
+++ b/sys/arch/sparc64/dev/iommu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iommu.c,v 1.62 2010/04/20 23:26:59 deraadt Exp $ */
+/* $OpenBSD: iommu.c,v 1.63 2011/04/07 15:30:16 miod Exp $ */
/* $NetBSD: iommu.c,v 1.47 2002/02/08 20:03:45 eeh Exp $ */
/*
@@ -1076,7 +1076,7 @@ iommu_dvmamap_append_range(bus_dma_tag_t t, bus_dmamap_t map, paddr_t pa,
sgend = sgstart + length - 1;
#ifdef DIAGNOSTIC
- if (sgstart == NULL || sgstart > sgend) {
+ if (sgstart == 0 || sgstart > sgend) {
printf("append range invalid mapping for %lx "
"(0x%llx - 0x%llx)\n", pa, sgstart, sgend);
map->dm_nsegs = 0;
@@ -1699,7 +1699,7 @@ iommu_iomap_insert_page(struct iommu_map_state *ims, paddr_t pa)
e = &ipm->ipm_map[ipm->ipm_pagecnt];
e->ipe_pa = pa;
- e->ipe_va = NULL;
+ e->ipe_va = 0;
e = SPLAY_INSERT(iommu_page_tree, &ipm->ipm_tree, e);
@@ -1787,7 +1787,7 @@ iommu_iomap_translate(struct iommu_map_state *ims, paddr_t pa)
e = SPLAY_FIND(iommu_page_tree, &ipm->ipm_tree, &pe);
if (e == NULL)
- return (NULL);
+ return (0);
return (e->ipe_va | offset);
}
diff --git a/sys/arch/sparc64/dev/uperf.c b/sys/arch/sparc64/dev/uperf.c
index 5989ea93105..5a079862d61 100644
--- a/sys/arch/sparc64/dev/uperf.c
+++ b/sys/arch/sparc64/dev/uperf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uperf.c,v 1.5 2003/06/02 20:02:49 jason Exp $ */
+/* $OpenBSD: uperf.c,v 1.6 2011/04/07 15:30:16 miod Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -146,7 +146,7 @@ uperf_findbyval(usc, cnt, uval, rval)
{
struct uperf_src *srcs = usc->usc_srcs;
- if (srcs->us_src == NULL)
+ if (srcs->us_src == 0)
return (EINVAL);
while (srcs->us_src != -1) {
@@ -191,7 +191,7 @@ uperf_findbysrc(usc, cnt, src, rval)
{
struct uperf_src *srcs = usc->usc_srcs;
- if (srcs->us_src == NULL)
+ if (srcs->us_src == 0)
return (EINVAL);
while (srcs->us_src != -1) {
diff --git a/sys/arch/sparc64/dev/viommu.c b/sys/arch/sparc64/dev/viommu.c
index af8797f4cb5..41d5260931e 100644
--- a/sys/arch/sparc64/dev/viommu.c
+++ b/sys/arch/sparc64/dev/viommu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: viommu.c,v 1.10 2010/08/07 03:50:01 krw Exp $ */
+/* $OpenBSD: viommu.c,v 1.11 2011/04/07 15:30:16 miod Exp $ */
/* $NetBSD: iommu.c,v 1.47 2002/02/08 20:03:45 eeh Exp $ */
/*
@@ -614,7 +614,7 @@ viommu_dvmamap_append_range(bus_dma_tag_t t, bus_dmamap_t map, paddr_t pa,
sgend = sgstart + length - 1;
#ifdef DIAGNOSTIC
- if (sgstart == NULL || sgstart > sgend) {
+ if (sgstart == 0 || sgstart > sgend) {
printf("append range invalid mapping for %lx "
"(0x%llx - 0x%llx)\n", pa, sgstart, sgend);
map->dm_nsegs = 0;
diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c
index ebcaff14048..af4b2326d49 100644
--- a/sys/arch/sparc64/sparc64/autoconf.c
+++ b/sys/arch/sparc64/sparc64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.109 2010/11/18 21:13:19 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.110 2011/04/07 15:30:16 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */
/*
@@ -1219,7 +1219,7 @@ int
romgetcursoraddr(rowp, colp)
int **rowp, **colp;
{
- cell_t row = NULL, col = NULL;
+ cell_t row = 0, col = 0;
OF_interpret("stdout @ is my-self addr line# addr column# ",
2, &col, &row);
@@ -1229,7 +1229,7 @@ romgetcursoraddr(rowp, colp)
* 64-bit values. To convert them to pointers to interfaces, add
* 4 to the address.
*/
- if (row == NULL || col == NULL)
+ if (row == 0 || col == 0)
return (-1);
*rowp = (int *)(row + 4);
*colp = (int *)(col + 4);
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index 1e0bfa84b9f..29aa600588f 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.128 2011/03/05 17:48:59 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.129 2011/04/07 15:30:16 miod Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
@@ -353,7 +353,7 @@ setregs(p, pack, stack, retval)
tf->tf_global[2] = tf->tf_global[7] = tf->tf_pc;
stack -= sizeof(struct rwindow);
tf->tf_out[6] = stack - STACK_OFFSET;
- tf->tf_out[7] = NULL;
+ tf->tf_out[7] = 0;
#ifdef NOTDEF_DEBUG
printf("setregs: setting tf %p sp %p pc %p\n", (long)tf,
(long)tf->tf_out[6], (long)tf->tf_pc);
@@ -1808,7 +1808,7 @@ sparc_bus_mmap(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t paddr,
{
if (PHYS_ASI(t0->asi)) {
printf("\nsparc_bus_mmap: physical ASI");
- return (NULL);
+ return (0);
}
/* Devices are un-cached... although the driver should do that */
diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c
index 4aefe5525fe..35099d8bcfe 100644
--- a/sys/arch/sparc64/sparc64/pmap.c
+++ b/sys/arch/sparc64/sparc64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.71 2010/11/20 20:33:24 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.72 2011/04/07 15:30:16 miod Exp $ */
/* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
/*
@@ -461,9 +461,9 @@ pmap_enter_kpage(vaddr_t va, int64_t data)
{
paddr_t newp;
- newp = NULL;
+ newp = 0;
while (pseg_set(pmap_kernel(), va, data, newp) == 1) {
- newp = NULL;
+ newp = 0;
if (!pmap_get_page(&newp, NULL, pmap_kernel())) {
prom_printf("pmap_enter_kpage: out of pages\n");
panic("pmap_enter_kpage");
@@ -1748,11 +1748,11 @@ pmap_release(pm)
pa);
}
}
- stxa(pdirentp, ASI_PHYS_CACHED, NULL);
+ stxa(pdirentp, ASI_PHYS_CACHED, 0);
pmap_free_page((paddr_t)ptbl, pm);
}
}
- stxa(psegentp, ASI_PHYS_CACHED, NULL);
+ stxa(psegentp, ASI_PHYS_CACHED, 0);
pmap_free_page((paddr_t)pdir, pm);
}
}
@@ -1836,14 +1836,14 @@ pmap_collect(pm)
}
if (!n) {
/* Free the damn thing */
- stxa((paddr_t)(u_long)&pdir[k], ASI_PHYS_CACHED, NULL);
+ stxa((paddr_t)(u_long)&pdir[k], ASI_PHYS_CACHED, 0);
pmap_free_page((paddr_t)ptbl, pm);
}
}
}
if (!m) {
/* Free the damn thing */
- stxa((paddr_t)(u_long)&pm->pm_segs[i], ASI_PHYS_CACHED, NULL);
+ stxa((paddr_t)(u_long)&pm->pm_segs[i], ASI_PHYS_CACHED, 0);
pmap_free_page((paddr_t)pdir, pm);
}
}
@@ -1890,7 +1890,7 @@ pmap_activate(p)
s = splvm();
if (p == curproc) {
write_user_windows();
- if (pmap->pm_ctx == NULL)
+ if (pmap->pm_ctx == 0)
ctx_alloc(pmap);
if (CPU_ISSUN4V)
stxa(CTX_SECONDARY, ASI_MMU_CONTEXTID, pmap->pm_ctx);
@@ -2153,9 +2153,9 @@ pmap_enter(pm, va, pa, prot, flags)
}
KDASSERT((tte.data & TLB_NFO) == 0);
- pg = NULL;
+ pg = 0;
while (pseg_set(pm, va, tte.data, pg) == 1) {
- pg = NULL;
+ pg = 0;
if (!pmap_get_page(&pg, NULL, pm)) {
if ((flags & PMAP_CANFAIL) == 0)
panic("pmap_enter: no memory");
@@ -3211,7 +3211,7 @@ ctx_alloc(pm)
*/
if (cnum >= numctx - 2)
cnum = 0;
- } while (ctxbusy[++cnum] != NULL && cnum != next);
+ } while (ctxbusy[++cnum] != 0 && cnum != next);
if (cnum==0) cnum++; /* Never steal ctx 0 */
if (ctxbusy[cnum]) {
int i;
@@ -3271,7 +3271,7 @@ ctx_free(pm)
Debugger();
}
#endif
- ctxbusy[oldctx] = NULL;
+ ctxbusy[oldctx] = 0;
}
/*
diff --git a/sys/arch/vax/mbus/mbus.c b/sys/arch/vax/mbus/mbus.c
index 5a4aad494fb..7663aab4235 100644
--- a/sys/arch/vax/mbus/mbus.c
+++ b/sys/arch/vax/mbus/mbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbus.c,v 1.3 2010/09/20 06:33:48 matthew Exp $ */
+/* $OpenBSD: mbus.c,v 1.4 2011/04/07 15:30:16 miod Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
@@ -126,7 +126,7 @@ mbus_attach(struct device *parent, struct device *self, void *aux)
pa = MBUS_SLOT_BASE(mid);
fbic = vax_map_physmem(pa + FBIC_BASE, 1);
- if (fbic == NULL)
+ if (fbic == 0)
panic("unable to map slot %d registers", mid);
if (badaddr((caddr_t)(fbic + FBIC_MODTYPE), 4) != 0)
@@ -170,7 +170,7 @@ mbus_attach(struct device *parent, struct device *self, void *aux)
ms->ms_fbic[1].regs = ms->ms_fbic[0].regs;
ms->ms_nfbic = 2;
fbic = vax_map_physmem(pa + FBIC_CPUA_BASE, 1);
- if (fbic == NULL)
+ if (fbic == 0)
panic("unable to map slot %d registers", mid);
ms->ms_fbic[0].base = pa + FBIC_CPUA_BASE;
ms->ms_fbic[0].regs = fbic;
diff --git a/sys/arch/vax/mbus/uba_mbus.c b/sys/arch/vax/mbus/uba_mbus.c
index ed78ffdcf2b..da1b9013b1b 100644
--- a/sys/arch/vax/mbus/uba_mbus.c
+++ b/sys/arch/vax/mbus/uba_mbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uba_mbus.c,v 1.1 2008/08/18 23:19:25 miod Exp $ */
+/* $OpenBSD: uba_mbus.c,v 1.2 2011/04/07 15:30:16 miod Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
@@ -115,7 +115,7 @@ uba_mbus_attach(struct device *parent, struct device *self, void *aux)
*/
modaddr = MBUS_SLOT_BASE(maa->maa_mid);
fbic = vax_map_physmem(modaddr + FBIC_BASE, 1);
- if (fbic == NULL) {
+ if (fbic == 0) {
printf("%s: can't setup M-bus range register\n");
return;
}
diff --git a/sys/arch/vax/vsa/lcg.c b/sys/arch/vax/vsa/lcg.c
index a714b10edae..529c577b230 100644
--- a/sys/arch/vax/vsa/lcg.c
+++ b/sys/arch/vax/vsa/lcg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lcg.c,v 1.15 2010/12/26 15:41:00 miod Exp $ */
+/* $OpenBSD: lcg.c,v 1.16 2011/04/07 15:30:16 miod Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
@@ -235,7 +235,7 @@ lcg_attach(struct device *parent, struct device *self, void *aux)
*/
if (!console) {
tmp = vax_map_physmem(LCG_CONFIG_ADDR, 1);
- if (tmp == NULL) {
+ if (tmp == 0) {
printf("\n%s: can not map configuration register\n",
self->dv_xname);
return;