summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-12 17:23:03 +0000
committerpfg <pfg@FreeBSD.org>2016-04-12 17:23:03 +0000
commit3a7d342befa3ff4d0e3ecd5baf88e128a41b636f (patch)
tree2f5a51580e841bd5961e1fbce270ccde7b31ac18
parent0ab6713ed2e7e2549651f3b4b88650e3bb644acb (diff)
downloadFreeBSD-src-3a7d342befa3ff4d0e3ecd5baf88e128a41b636f.zip
FreeBSD-src-3a7d342befa3ff4d0e3ecd5baf88e128a41b636f.tar.gz
Replace 0 with NULL for pointers in misc. device drivers.
Found with devel/coccinelle.
-rw-r--r--sys/dev/mn/if_mn.c14
-rw-r--r--sys/dev/mpt/mpt_raid.c2
-rw-r--r--sys/dev/mrsas/mrsas_ioctl.c2
-rw-r--r--sys/dev/mvs/mvs_pci.c2
-rw-r--r--sys/dev/mvs/mvs_soc.c2
-rw-r--r--sys/dev/nxge/xgehal/xgehal-device.c2
-rw-r--r--sys/dev/sound/isa/ad1816.c8
-rw-r--r--sys/dev/sound/isa/ess.c8
-rw-r--r--sys/dev/sound/isa/mss.c14
-rw-r--r--sys/dev/sound/isa/sb16.c8
-rw-r--r--sys/dev/sound/isa/sb8.c6
-rw-r--r--sys/dev/sound/midi/midi.c2
-rw-r--r--sys/dev/sound/pci/als4000.c10
-rw-r--r--sys/dev/sound/pci/aureal.c6
-rw-r--r--sys/dev/sound/pci/cmi.c6
-rw-r--r--sys/dev/sound/pci/emu10k1.c2
-rw-r--r--sys/dev/sound/pci/emu10kx.c2
-rw-r--r--sys/dev/sound/pci/fm801.c5
-rw-r--r--sys/dev/sound/pci/neomagic.c2
-rw-r--r--sys/dev/sound/pci/solo.c12
-rw-r--r--sys/dev/sound/pci/t4dwave.c2
-rw-r--r--sys/dev/sound/pci/via8233.c2
-rw-r--r--sys/dev/sound/pci/via82c686.c4
-rw-r--r--sys/dev/vxge/vxgehal/vxgehal-fifo.c6
-rw-r--r--sys/dev/vxge/vxgehal/vxgehal-mrpcim.c2
25 files changed, 67 insertions, 64 deletions
diff --git a/sys/dev/mn/if_mn.c b/sys/dev/mn/if_mn.c
index 2f1ea5f..0356f53 100644
--- a/sys/dev/mn/if_mn.c
+++ b/sys/dev/mn/if_mn.c
@@ -617,7 +617,7 @@ ngmn_rcvdata(hook_p hook, item_p item)
mn_free_desc(dp);
dp = dp2;
}
- sc->ch[chan]->xl->vnext = 0;
+ sc->ch[chan]->xl->vnext = NULL;
break;
}
dp->data = vtophys(m2->m_data);
@@ -625,7 +625,7 @@ ngmn_rcvdata(hook_p hook, item_p item)
dp->flags += 1;
len -= m2->m_len;
dp->next = vtophys(dp);
- dp->vnext = 0;
+ dp->vnext = NULL;
sc->ch[chan]->xl->next = vtophys(dp);
sc->ch[chan]->xl->vnext = dp;
sc->ch[chan]->xl = dp;
@@ -634,7 +634,7 @@ ngmn_rcvdata(hook_p hook, item_p item)
dp->flags |= 0xc0000000;
dp2->flags &= ~0x40000000;
} else {
- dp->m = 0;
+ dp->m = NULL;
m2 = m2->m_next;
}
}
@@ -698,7 +698,7 @@ ngmn_connect(hook_p hook)
dp->m = m;
dp->flags = 0xc0000000 + (1 << 16);
dp->next = vtophys(dp);
- dp->vnext = 0;
+ dp->vnext = NULL;
dp->data = vtophys(sc->name);
sc->m32_mem.cs[chan].tdesc = vtophys(dp);
sc->ch[chan]->x1 = dp;
@@ -715,7 +715,7 @@ ngmn_connect(hook_p hook)
dp->flags = 0x40000000;
dp->flags += 1600 << 16;
dp->next = vtophys(dp);
- dp->vnext = 0;
+ dp->vnext = NULL;
sc->ch[chan]->rl = dp;
for (i = 0; i < (nts + 10); i++) {
@@ -1127,7 +1127,7 @@ mn_rx_intr(struct mn_softc *sc, u_int32_t vector)
if (vtophys(dp) == sc->m32_mem.crxd[chan])
return;
m = dp->m;
- dp->m = 0;
+ dp->m = NULL;
m->m_pkthdr.len = m->m_len = (dp->status >> 16) & 0x1fff;
err = (dp->status >> 8) & 0xff;
if (!err) {
@@ -1176,7 +1176,7 @@ mn_rx_intr(struct mn_softc *sc, u_int32_t vector)
dp->flags = 0x40000000;
dp->flags += 1600 << 16;
dp->next = vtophys(dp);
- dp->vnext = 0;
+ dp->vnext = NULL;
sc->ch[chan]->rl->next = vtophys(dp);
sc->ch[chan]->rl->vnext = dp;
sc->ch[chan]->rl->flags &= ~0x40000000;
diff --git a/sys/dev/mpt/mpt_raid.c b/sys/dev/mpt/mpt_raid.c
index 6b45b54..ac65e2f 100644
--- a/sys/dev/mpt/mpt_raid.c
+++ b/sys/dev/mpt/mpt_raid.c
@@ -595,7 +595,7 @@ mpt_issue_raid_req(struct mpt_softc *mpt, struct mpt_raid_volume *vol,
rap->Function = MPI_FUNCTION_RAID_ACTION;
rap->VolumeID = vol->config_page->VolumeID;
rap->VolumeBus = vol->config_page->VolumeBus;
- if (disk != 0)
+ if (disk != NULL)
rap->PhysDiskNum = disk->config_page.PhysDiskNum;
else
rap->PhysDiskNum = 0xFF;
diff --git a/sys/dev/mrsas/mrsas_ioctl.c b/sys/dev/mrsas/mrsas_ioctl.c
index 3c4dbf9..6258e63 100644
--- a/sys/dev/mrsas/mrsas_ioctl.c
+++ b/sys/dev/mrsas/mrsas_ioctl.c
@@ -86,7 +86,7 @@ mrsas_passthru(struct mrsas_softc *sc, void *arg, u_long ioctlCmd)
bus_addr_t ioctl_data_phys_addr[MAX_IOCTL_SGE];
bus_dma_tag_t ioctl_sense_tag = 0;
bus_dmamap_t ioctl_sense_dmamap = 0;
- void *ioctl_sense_mem = 0;
+ void *ioctl_sense_mem = NULL;
bus_addr_t ioctl_sense_phys_addr = 0;
int i, ioctl_data_size = 0, ioctl_sense_size, ret = 0;
struct mrsas_sge32 *kern_sge32;
diff --git a/sys/dev/mvs/mvs_pci.c b/sys/dev/mvs/mvs_pci.c
index b3262f8..798f107 100644
--- a/sys/dev/mvs/mvs_pci.c
+++ b/sys/dev/mvs/mvs_pci.c
@@ -316,7 +316,7 @@ mvs_setup_interrupt(device_t dev)
device_printf(dev, "unable to setup interrupt\n");
bus_release_resource(dev, SYS_RES_IRQ,
ctlr->irq.r_irq_rid, ctlr->irq.r_irq);
- ctlr->irq.r_irq = 0;
+ ctlr->irq.r_irq = NULL;
return (ENXIO);
}
return (0);
diff --git a/sys/dev/mvs/mvs_soc.c b/sys/dev/mvs/mvs_soc.c
index b34df30..31cdefd 100644
--- a/sys/dev/mvs/mvs_soc.c
+++ b/sys/dev/mvs/mvs_soc.c
@@ -287,7 +287,7 @@ mvs_setup_interrupt(device_t dev)
device_printf(dev, "unable to setup interrupt\n");
bus_release_resource(dev, SYS_RES_IRQ,
ctlr->irq.r_irq_rid, ctlr->irq.r_irq);
- ctlr->irq.r_irq = 0;
+ ctlr->irq.r_irq = NULL;
return (ENXIO);
}
return (0);
diff --git a/sys/dev/nxge/xgehal/xgehal-device.c b/sys/dev/nxge/xgehal/xgehal-device.c
index 2f52a7e..10cd5f3 100644
--- a/sys/dev/nxge/xgehal/xgehal-device.c
+++ b/sys/dev/nxge/xgehal/xgehal-device.c
@@ -5571,7 +5571,7 @@ __hal_device_get_vpd_data(xge_hal_device_t *hldev)
xge_os_strcpy((char *) hldev->vpd_data.serial_num, "not available");
vpd_data = ( u8*) xge_os_malloc(hldev->pdev, XGE_HAL_VPD_BUFFER_SIZE + 16);
- if ( vpd_data == 0 )
+ if ( vpd_data == NULL )
return;
for (index = 0; index < XGE_HAL_VPD_BUFFER_SIZE; index +=4 ) {
diff --git a/sys/dev/sound/isa/ad1816.c b/sys/dev/sound/isa/ad1816.c
index 2ae39cf..32a7d47 100644
--- a/sys/dev/sound/isa/ad1816.c
+++ b/sys/dev/sound/isa/ad1816.c
@@ -490,21 +490,21 @@ ad1816_release_resources(struct ad1816_info *ad1816, device_t dev)
if (ad1816->ih)
bus_teardown_intr(dev, ad1816->irq, ad1816->ih);
bus_release_resource(dev, SYS_RES_IRQ, ad1816->irq_rid, ad1816->irq);
- ad1816->irq = 0;
+ ad1816->irq = NULL;
}
if (ad1816->drq1) {
isa_dma_release(rman_get_start(ad1816->drq1));
bus_release_resource(dev, SYS_RES_DRQ, ad1816->drq1_rid, ad1816->drq1);
- ad1816->drq1 = 0;
+ ad1816->drq1 = NULL;
}
if (ad1816->drq2) {
isa_dma_release(rman_get_start(ad1816->drq2));
bus_release_resource(dev, SYS_RES_DRQ, ad1816->drq2_rid, ad1816->drq2);
- ad1816->drq2 = 0;
+ ad1816->drq2 = NULL;
}
if (ad1816->io_base) {
bus_release_resource(dev, SYS_RES_IOPORT, ad1816->io_rid, ad1816->io_base);
- ad1816->io_base = 0;
+ ad1816->io_base = NULL;
}
if (ad1816->parent_dmat) {
bus_dma_tag_destroy(ad1816->parent_dmat);
diff --git a/sys/dev/sound/isa/ess.c b/sys/dev/sound/isa/ess.c
index e4032de..7c1ae30 100644
--- a/sys/dev/sound/isa/ess.c
+++ b/sys/dev/sound/isa/ess.c
@@ -291,21 +291,21 @@ ess_release_resources(struct ess_info *sc, device_t dev)
if (sc->ih)
bus_teardown_intr(dev, sc->irq, sc->ih);
bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq);
- sc->irq = 0;
+ sc->irq = NULL;
}
if (sc->drq1) {
isa_dma_release(rman_get_start(sc->drq1));
bus_release_resource(dev, SYS_RES_DRQ, 0, sc->drq1);
- sc->drq1 = 0;
+ sc->drq1 = NULL;
}
if (sc->drq2) {
isa_dma_release(rman_get_start(sc->drq2));
bus_release_resource(dev, SYS_RES_DRQ, 1, sc->drq2);
- sc->drq2 = 0;
+ sc->drq2 = NULL;
}
if (sc->io_base) {
bus_release_resource(dev, SYS_RES_IOPORT, 0, sc->io_base);
- sc->io_base = 0;
+ sc->io_base = NULL;
}
if (sc->parent_dmat) {
bus_dma_tag_destroy(sc->parent_dmat);
diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c
index 62f6617..4f5548e 100644
--- a/sys/dev/sound/isa/mss.c
+++ b/sys/dev/sound/isa/mss.c
@@ -277,7 +277,7 @@ mss_release_resources(struct mss_info *mss, device_t dev)
bus_teardown_intr(dev, mss->irq, mss->ih);
bus_release_resource(dev, SYS_RES_IRQ, mss->irq_rid,
mss->irq);
- mss->irq = 0;
+ mss->irq = NULL;
}
if (mss->drq2) {
if (mss->drq2 != mss->drq1) {
@@ -285,28 +285,28 @@ mss_release_resources(struct mss_info *mss, device_t dev)
bus_release_resource(dev, SYS_RES_DRQ, mss->drq2_rid,
mss->drq2);
}
- mss->drq2 = 0;
+ mss->drq2 = NULL;
}
if (mss->drq1) {
isa_dma_release(rman_get_start(mss->drq1));
bus_release_resource(dev, SYS_RES_DRQ, mss->drq1_rid,
mss->drq1);
- mss->drq1 = 0;
+ mss->drq1 = NULL;
}
if (mss->io_base) {
bus_release_resource(dev, SYS_RES_IOPORT, mss->io_rid,
mss->io_base);
- mss->io_base = 0;
+ mss->io_base = NULL;
}
if (mss->conf_base) {
bus_release_resource(dev, SYS_RES_IOPORT, mss->conf_rid,
mss->conf_base);
- mss->conf_base = 0;
+ mss->conf_base = NULL;
}
if (mss->indir) {
bus_release_resource(dev, SYS_RES_IOPORT, mss->indir_rid,
mss->indir);
- mss->indir = 0;
+ mss->indir = NULL;
}
if (mss->parent_dmat) {
bus_dma_tag_destroy(mss->parent_dmat);
@@ -1686,7 +1686,7 @@ ymf_test(device_t dev, struct mss_info *mss)
/* PC98 need this. I don't know reason why. */
bus_delete_resource(dev, SYS_RES_IOPORT, mss->conf_rid);
#endif
- mss->conf_base = 0;
+ mss->conf_base = NULL;
continue;
}
version = conf_rd(mss, OPL3SAx_MISC) & 0x07;
diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c
index 946c6bf..141ea01 100644
--- a/sys/dev/sound/isa/sb16.c
+++ b/sys/dev/sound/isa/sb16.c
@@ -435,23 +435,23 @@ sb16_release_resources(struct sb_info *sb, device_t dev)
if (sb->ih)
bus_teardown_intr(dev, sb->irq, sb->ih);
bus_release_resource(dev, SYS_RES_IRQ, 0, sb->irq);
- sb->irq = 0;
+ sb->irq = NULL;
}
if (sb->drq2) {
if (sb->drq2 != sb->drq1) {
isa_dma_release(rman_get_start(sb->drq2));
bus_release_resource(dev, SYS_RES_DRQ, 1, sb->drq2);
}
- sb->drq2 = 0;
+ sb->drq2 = NULL;
}
if (sb->drq1) {
isa_dma_release(rman_get_start(sb->drq1));
bus_release_resource(dev, SYS_RES_DRQ, 0, sb->drq1);
- sb->drq1 = 0;
+ sb->drq1 = NULL;
}
if (sb->io_base) {
bus_release_resource(dev, SYS_RES_IOPORT, 0, sb->io_base);
- sb->io_base = 0;
+ sb->io_base = NULL;
}
if (sb->parent_dmat) {
bus_dma_tag_destroy(sb->parent_dmat);
diff --git a/sys/dev/sound/isa/sb8.c b/sys/dev/sound/isa/sb8.c
index c9ed746..047e11d 100644
--- a/sys/dev/sound/isa/sb8.c
+++ b/sys/dev/sound/isa/sb8.c
@@ -265,16 +265,16 @@ sb_release_resources(struct sb_info *sb, device_t dev)
if (sb->ih)
bus_teardown_intr(dev, sb->irq, sb->ih);
bus_release_resource(dev, SYS_RES_IRQ, 0, sb->irq);
- sb->irq = 0;
+ sb->irq = NULL;
}
if (sb->drq) {
isa_dma_release(rman_get_start(sb->drq));
bus_release_resource(dev, SYS_RES_DRQ, 0, sb->drq);
- sb->drq = 0;
+ sb->drq = NULL;
}
if (sb->io_base) {
bus_release_resource(dev, SYS_RES_IOPORT, 0, sb->io_base);
- sb->io_base = 0;
+ sb->io_base = NULL;
}
if (sb->parent_dmat) {
bus_dma_tag_destroy(sb->parent_dmat);
diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c
index 71f7772..daa34ed 100644
--- a/sys/dev/sound/midi/midi.c
+++ b/sys/dev/sound/midi/midi.c
@@ -1489,7 +1489,7 @@ midi_modevent(module_t mod, int type, void *data)
kobj_t
midimapper_addseq(void *arg1, int *unit, void **cookie)
{
- unit = 0;
+ unit = NULL;
return (kobj_t)arg1;
}
diff --git a/sys/dev/sound/pci/als4000.c b/sys/dev/sound/pci/als4000.c
index bb38749..de59522 100644
--- a/sys/dev/sound/pci/als4000.c
+++ b/sys/dev/sound/pci/als4000.c
@@ -736,15 +736,15 @@ als_resource_free(device_t dev, struct sc_info *sc)
{
if (sc->reg) {
bus_release_resource(dev, SYS_RES_IOPORT, sc->regid, sc->reg);
- sc->reg = 0;
+ sc->reg = NULL;
}
if (sc->ih) {
bus_teardown_intr(dev, sc->irq, sc->ih);
- sc->ih = 0;
+ sc->ih = NULL;
}
if (sc->irq) {
bus_release_resource(dev, SYS_RES_IRQ, sc->irqid, sc->irq);
- sc->irq = 0;
+ sc->irq = NULL;
}
if (sc->parent_dmat) {
bus_dma_tag_destroy(sc->parent_dmat);
@@ -762,7 +762,7 @@ als_resource_grab(device_t dev, struct sc_info *sc)
sc->regid = PCIR_BAR(0);
sc->reg = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &sc->regid,
RF_ACTIVE);
- if (sc->reg == 0) {
+ if (sc->reg == NULL) {
device_printf(dev, "unable to allocate register space\n");
goto bad;
}
@@ -771,7 +771,7 @@ als_resource_grab(device_t dev, struct sc_info *sc)
sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqid,
RF_ACTIVE | RF_SHAREABLE);
- if (sc->irq == 0) {
+ if (sc->irq == NULL) {
device_printf(dev, "unable to allocate interrupt\n");
goto bad;
}
diff --git a/sys/dev/sound/pci/aureal.c b/sys/dev/sound/pci/aureal.c
index f990f43..f38ba12 100644
--- a/sys/dev/sound/pci/aureal.c
+++ b/sys/dev/sound/pci/aureal.c
@@ -556,8 +556,8 @@ au_pci_attach(device_t dev)
struct resource *reg[10];
int i, j, mapped = 0;
int irqid;
- struct resource *irq = 0;
- void *ih = 0;
+ struct resource *irq;
+ void *ih;
struct ac97_info *codec;
char status[SND_STATUSLEN];
@@ -566,6 +566,8 @@ au_pci_attach(device_t dev)
pci_enable_busmaster(dev);
+ irq = NULL;
+ ih = NULL;
j=0;
/* XXX dfr: is this strictly necessary? */
for (i=0; i<PCI_MAXMAPS_0; i++) {
diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c
index 9e62659..3e4b048 100644
--- a/sys/dev/sound/pci/cmi.c
+++ b/sys/dev/sound/pci/cmi.c
@@ -803,8 +803,8 @@ cmi_muninit(struct mpu401 *arg, void *cookie)
struct sc_info *sc = cookie;
snd_mtxlock(sc->lock);
- sc->mpu_intr = 0;
- sc->mpu = 0;
+ sc->mpu_intr = NULL;
+ sc->mpu = NULL;
snd_mtxunlock(sc->lock);
return 0;
@@ -902,7 +902,7 @@ cmi_uninit(struct sc_info *sc)
cmi_clr4(sc, CMPCI_REG_FUNC_1, CMPCI_REG_UART_ENABLE);
if( sc->mpu )
- sc->mpu_intr = 0;
+ sc->mpu_intr = NULL;
}
/* ------------------------------------------------------------------------- */
diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c
index f1d77ee..e03127c 100644
--- a/sys/dev/sound/pci/emu10k1.c
+++ b/sys/dev/sound/pci/emu10k1.c
@@ -1178,7 +1178,7 @@ emu_muninit(struct mpu401 *arg, void *cookie)
struct sc_info *sc = cookie;
snd_mtxlock(sc->lock);
- sc->mpu_intr = 0;
+ sc->mpu_intr = NULL;
snd_mtxunlock(sc->lock);
return 0;
diff --git a/sys/dev/sound/pci/emu10kx.c b/sys/dev/sound/pci/emu10kx.c
index bd97ab8..cb441bb 100644
--- a/sys/dev/sound/pci/emu10kx.c
+++ b/sys/dev/sound/pci/emu10kx.c
@@ -2351,7 +2351,7 @@ emu10kx_dev_uninit(struct emu_sc_info *sc)
}
if (sc->cdev)
destroy_dev(sc->cdev);
- sc->cdev = 0;
+ sc->cdev = NULL;
mtx_destroy(&sc->emu10kx_lock);
return (0);
diff --git a/sys/dev/sound/pci/fm801.c b/sys/dev/sound/pci/fm801.c
index 252e714..c1b6393 100644
--- a/sys/dev/sound/pci/fm801.c
+++ b/sys/dev/sound/pci/fm801.c
@@ -573,7 +573,7 @@ fm801_init(struct fm801_info *fm801)
static int
fm801_pci_attach(device_t dev)
{
- struct ac97_info *codec = 0;
+ struct ac97_info *codec = NULL;
struct fm801_info *fm801;
int i;
int mapped = 0;
@@ -622,7 +622,8 @@ fm801_pci_attach(device_t dev)
fm801->irqid = 0;
fm801->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &fm801->irqid,
RF_ACTIVE | RF_SHAREABLE);
- if (!fm801->irq || snd_setup_intr(dev, fm801->irq, 0, fm801_intr, fm801, &fm801->ih)) {
+ if (!fm801->irq ||
+ snd_setup_intr(dev, fm801->irq, 0, fm801_intr, fm801, &fm801->ih)) {
device_printf(dev, "unable to map interrupt\n");
goto oops;
}
diff --git a/sys/dev/sound/pci/neomagic.c b/sys/dev/sound/pci/neomagic.c
index 8a78bf7..e2db543 100644
--- a/sys/dev/sound/pci/neomagic.c
+++ b/sys/dev/sound/pci/neomagic.c
@@ -664,7 +664,7 @@ static int
nm_pci_attach(device_t dev)
{
struct sc_info *sc;
- struct ac97_info *codec = 0;
+ struct ac97_info *codec = NULL;
char status[SND_STATUSLEN];
sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO);
diff --git a/sys/dev/sound/pci/solo.c b/sys/dev/sound/pci/solo.c
index dc46ac8..75d1ad4 100644
--- a/sys/dev/sound/pci/solo.c
+++ b/sys/dev/sound/pci/solo.c
@@ -836,31 +836,31 @@ ess_release_resources(struct ess_info *sc, device_t dev)
if (sc->ih)
bus_teardown_intr(dev, sc->irq, sc->ih);
bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq);
- sc->irq = 0;
+ sc->irq = NULL;
}
if (sc->io) {
bus_release_resource(dev, SYS_RES_IOPORT, PCIR_BAR(0), sc->io);
- sc->io = 0;
+ sc->io = NULL;
}
if (sc->sb) {
bus_release_resource(dev, SYS_RES_IOPORT, PCIR_BAR(1), sc->sb);
- sc->sb = 0;
+ sc->sb = NULL;
}
if (sc->vc) {
bus_release_resource(dev, SYS_RES_IOPORT, PCIR_BAR(2), sc->vc);
- sc->vc = 0;
+ sc->vc = NULL;
}
if (sc->mpu) {
bus_release_resource(dev, SYS_RES_IOPORT, PCIR_BAR(3), sc->mpu);
- sc->mpu = 0;
+ sc->mpu = NULL;
}
if (sc->gp) {
bus_release_resource(dev, SYS_RES_IOPORT, PCIR_BAR(4), sc->gp);
- sc->gp = 0;
+ sc->gp = NULL;
}
if (sc->parent_dmat) {
diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c
index 32ddd00..6530b5b 100644
--- a/sys/dev/sound/pci/t4dwave.c
+++ b/sys/dev/sound/pci/t4dwave.c
@@ -823,7 +823,7 @@ static int
tr_pci_attach(device_t dev)
{
struct tr_info *tr;
- struct ac97_info *codec = 0;
+ struct ac97_info *codec = NULL;
bus_addr_t lowaddr;
int i, dacn;
char status[SND_STATUSLEN];
diff --git a/sys/dev/sound/pci/via8233.c b/sys/dev/sound/pci/via8233.c
index 45fe175..2bd54e4 100644
--- a/sys/dev/sound/pci/via8233.c
+++ b/sys/dev/sound/pci/via8233.c
@@ -1164,7 +1164,7 @@ via_chip_init(device_t dev)
static int
via_attach(device_t dev)
{
- struct via_info *via = 0;
+ struct via_info *via = NULL;
char status[SND_STATUSLEN];
int i, via_dxs_disabled, via_dxs_src, via_dxs_chnum, via_sgd_chnum;
int nsegs;
diff --git a/sys/dev/sound/pci/via82c686.c b/sys/dev/sound/pci/via82c686.c
index 4484d6e..4c4a412 100644
--- a/sys/dev/sound/pci/via82c686.c
+++ b/sys/dev/sound/pci/via82c686.c
@@ -477,7 +477,7 @@ dma_cb(void *p, bus_dma_segment_t *bds, int a, int b)
static int
via_attach(device_t dev)
{
- struct via_info *via = 0;
+ struct via_info *via = NULL;
char status[SND_STATUSLEN];
u_int32_t data, cnt;
@@ -618,7 +618,7 @@ static int
via_detach(device_t dev)
{
int r;
- struct via_info *via = 0;
+ struct via_info *via = NULL;
r = pcm_unregister(dev);
if (r)
diff --git a/sys/dev/vxge/vxgehal/vxgehal-fifo.c b/sys/dev/vxge/vxgehal/vxgehal-fifo.c
index e5f6c78..771f880 100644
--- a/sys/dev/vxge/vxgehal/vxgehal-fifo.c
+++ b/sys/dev/vxge/vxgehal/vxgehal-fifo.c
@@ -1030,7 +1030,7 @@ vxge_hal_fifo_txdl_buffer_set_aligned(
ptrdiff_t prev_boff;
vxge_assert((vpath_handle != NULL) && (txdlh != NULL) &&
- (vaddr != 0) && (dma_pointer != 0) &&
+ (vaddr != NULL) && (dma_pointer != 0) &&
(size != 0) && (misaligned_size != 0));
hldev = vp->vpath->hldev;
@@ -1145,8 +1145,8 @@ vxge_hal_fifo_txdl_buffer_append(
__hal_fifo_txdl_priv_t *txdl_priv;
ptrdiff_t used;
- vxge_assert((vpath_handle != NULL) && (txdlh != NULL) && (vaddr != 0) &&
- (size == 0));
+ vxge_assert((vpath_handle != NULL) && (txdlh != NULL) &&
+ (vaddr != NULL) && (size == 0));
hldev = vp->vpath->hldev;
diff --git a/sys/dev/vxge/vxgehal/vxgehal-mrpcim.c b/sys/dev/vxge/vxgehal/vxgehal-mrpcim.c
index 94337c0..3852763 100644
--- a/sys/dev/vxge/vxgehal/vxgehal-mrpcim.c
+++ b/sys/dev/vxge/vxgehal/vxgehal-mrpcim.c
@@ -5613,7 +5613,7 @@ __hal_mrpcim_get_vpd_data(__hal_device_t *hldev)
}
vpd_data = (u8 *) vxge_os_malloc(hldev->header.pdev,
VXGE_HAL_VPD_BUFFER_SIZE + 16);
- if (vpd_data == 0)
+ if (vpd_data == NULL)
return;
for (i = 0; i < VXGE_HAL_VPD_BUFFER_SIZE; i += 4) {
OpenPOWER on IntegriCloud