svn commit: r297862 - in head/sys/dev: mn mpt mrsas mvs nxge/xgehal sound/isa sound/midi sound/pci vxge/vxgehal
Pedro F. Giffuni
pfg at FreeBSD.org
Tue Apr 12 17:23:06 UTC 2016
Author: pfg
Date: Tue Apr 12 17:23:03 2016
New Revision: 297862
URL: https://svnweb.freebsd.org/changeset/base/297862
Log:
Replace 0 with NULL for pointers in misc. device drivers.
Found with devel/coccinelle.
Modified:
head/sys/dev/mn/if_mn.c
head/sys/dev/mpt/mpt_raid.c
head/sys/dev/mrsas/mrsas_ioctl.c
head/sys/dev/mvs/mvs_pci.c
head/sys/dev/mvs/mvs_soc.c
head/sys/dev/nxge/xgehal/xgehal-device.c
head/sys/dev/sound/isa/ad1816.c
head/sys/dev/sound/isa/ess.c
head/sys/dev/sound/isa/mss.c
head/sys/dev/sound/isa/sb16.c
head/sys/dev/sound/isa/sb8.c
head/sys/dev/sound/midi/midi.c
head/sys/dev/sound/pci/als4000.c
head/sys/dev/sound/pci/aureal.c
head/sys/dev/sound/pci/cmi.c
head/sys/dev/sound/pci/emu10k1.c
head/sys/dev/sound/pci/emu10kx.c
head/sys/dev/sound/pci/fm801.c
head/sys/dev/sound/pci/neomagic.c
head/sys/dev/sound/pci/solo.c
head/sys/dev/sound/pci/t4dwave.c
head/sys/dev/sound/pci/via8233.c
head/sys/dev/sound/pci/via82c686.c
head/sys/dev/vxge/vxgehal/vxgehal-fifo.c
head/sys/dev/vxge/vxgehal/vxgehal-mrpcim.c
Modified: head/sys/dev/mn/if_mn.c
==============================================================================
--- head/sys/dev/mn/if_mn.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/mn/if_mn.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -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_
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_
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;
Modified: head/sys/dev/mpt/mpt_raid.c
==============================================================================
--- head/sys/dev/mpt/mpt_raid.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/mpt/mpt_raid.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -595,7 +595,7 @@ mpt_issue_raid_req(struct mpt_softc *mpt
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;
Modified: head/sys/dev/mrsas/mrsas_ioctl.c
==============================================================================
--- head/sys/dev/mrsas/mrsas_ioctl.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/mrsas/mrsas_ioctl.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -86,7 +86,7 @@ mrsas_passthru(struct mrsas_softc *sc, v
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;
Modified: head/sys/dev/mvs/mvs_pci.c
==============================================================================
--- head/sys/dev/mvs/mvs_pci.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/mvs/mvs_pci.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -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);
Modified: head/sys/dev/mvs/mvs_soc.c
==============================================================================
--- head/sys/dev/mvs/mvs_soc.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/mvs/mvs_soc.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -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);
Modified: head/sys/dev/nxge/xgehal/xgehal-device.c
==============================================================================
--- head/sys/dev/nxge/xgehal/xgehal-device.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/nxge/xgehal/xgehal-device.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -5571,7 +5571,7 @@ __hal_device_get_vpd_data(xge_hal_device
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 ) {
Modified: head/sys/dev/sound/isa/ad1816.c
==============================================================================
--- head/sys/dev/sound/isa/ad1816.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/isa/ad1816.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -490,21 +490,21 @@ ad1816_release_resources(struct ad1816_i
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);
Modified: head/sys/dev/sound/isa/ess.c
==============================================================================
--- head/sys/dev/sound/isa/ess.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/isa/ess.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -291,21 +291,21 @@ ess_release_resources(struct ess_info *s
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);
Modified: head/sys/dev/sound/isa/mss.c
==============================================================================
--- head/sys/dev/sound/isa/mss.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/isa/mss.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -277,7 +277,7 @@ mss_release_resources(struct mss_info *m
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 *m
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 *
/* 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;
Modified: head/sys/dev/sound/isa/sb16.c
==============================================================================
--- head/sys/dev/sound/isa/sb16.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/isa/sb16.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -435,23 +435,23 @@ sb16_release_resources(struct sb_info *s
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);
Modified: head/sys/dev/sound/isa/sb8.c
==============================================================================
--- head/sys/dev/sound/isa/sb8.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/isa/sb8.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -265,16 +265,16 @@ sb_release_resources(struct sb_info *sb,
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);
Modified: head/sys/dev/sound/midi/midi.c
==============================================================================
--- head/sys/dev/sound/midi/midi.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/midi/midi.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -1489,7 +1489,7 @@ midi_modevent(module_t mod, int type, vo
kobj_t
midimapper_addseq(void *arg1, int *unit, void **cookie)
{
- unit = 0;
+ unit = NULL;
return (kobj_t)arg1;
}
Modified: head/sys/dev/sound/pci/als4000.c
==============================================================================
--- head/sys/dev/sound/pci/als4000.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/pci/als4000.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -736,15 +736,15 @@ als_resource_free(device_t dev, struct s
{
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 s
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 s
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;
}
Modified: head/sys/dev/sound/pci/aureal.c
==============================================================================
--- head/sys/dev/sound/pci/aureal.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/pci/aureal.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -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++) {
Modified: head/sys/dev/sound/pci/cmi.c
==============================================================================
--- head/sys/dev/sound/pci/cmi.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/pci/cmi.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -803,8 +803,8 @@ cmi_muninit(struct mpu401 *arg, void *co
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;
}
/* ------------------------------------------------------------------------- */
Modified: head/sys/dev/sound/pci/emu10k1.c
==============================================================================
--- head/sys/dev/sound/pci/emu10k1.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/pci/emu10k1.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -1178,7 +1178,7 @@ emu_muninit(struct mpu401 *arg, void *co
struct sc_info *sc = cookie;
snd_mtxlock(sc->lock);
- sc->mpu_intr = 0;
+ sc->mpu_intr = NULL;
snd_mtxunlock(sc->lock);
return 0;
Modified: head/sys/dev/sound/pci/emu10kx.c
==============================================================================
--- head/sys/dev/sound/pci/emu10kx.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/pci/emu10kx.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -2351,7 +2351,7 @@ emu10kx_dev_uninit(struct emu_sc_info *s
}
if (sc->cdev)
destroy_dev(sc->cdev);
- sc->cdev = 0;
+ sc->cdev = NULL;
mtx_destroy(&sc->emu10kx_lock);
return (0);
Modified: head/sys/dev/sound/pci/fm801.c
==============================================================================
--- head/sys/dev/sound/pci/fm801.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/pci/fm801.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -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;
}
Modified: head/sys/dev/sound/pci/neomagic.c
==============================================================================
--- head/sys/dev/sound/pci/neomagic.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/pci/neomagic.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -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);
Modified: head/sys/dev/sound/pci/solo.c
==============================================================================
--- head/sys/dev/sound/pci/solo.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/pci/solo.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -836,31 +836,31 @@ ess_release_resources(struct ess_info *s
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) {
Modified: head/sys/dev/sound/pci/t4dwave.c
==============================================================================
--- head/sys/dev/sound/pci/t4dwave.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/pci/t4dwave.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -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];
Modified: head/sys/dev/sound/pci/via8233.c
==============================================================================
--- head/sys/dev/sound/pci/via8233.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/pci/via8233.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -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;
Modified: head/sys/dev/sound/pci/via82c686.c
==============================================================================
--- head/sys/dev/sound/pci/via82c686.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/sound/pci/via82c686.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -477,7 +477,7 @@ dma_cb(void *p, bus_dma_segment_t *bds,
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)
Modified: head/sys/dev/vxge/vxgehal/vxgehal-fifo.c
==============================================================================
--- head/sys/dev/vxge/vxgehal/vxgehal-fifo.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/vxge/vxgehal/vxgehal-fifo.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -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;
Modified: head/sys/dev/vxge/vxgehal/vxgehal-mrpcim.c
==============================================================================
--- head/sys/dev/vxge/vxgehal/vxgehal-mrpcim.c Tue Apr 12 17:00:13 2016 (r297861)
+++ head/sys/dev/vxge/vxgehal/vxgehal-mrpcim.c Tue Apr 12 17:23:03 2016 (r297862)
@@ -5613,7 +5613,7 @@ __hal_mrpcim_get_vpd_data(__hal_device_t
}
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) {
More information about the svn-src-head
mailing list