arm: for pointers replace 0 with NULL.
These are mostly cosmetical, no functional change. Found with devel/coccinelle.
This commit is contained in:
parent
2049b03cc8
commit
41b610a8ee
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298055
@ -234,7 +234,7 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid,
|
||||
}
|
||||
|
||||
rv = rman_reserve_resource(rm, start, end, count, flags, child);
|
||||
if (rv == 0)
|
||||
if (rv == NULL)
|
||||
return (NULL);
|
||||
|
||||
rman_set_rid(rv, *rid);
|
||||
|
@ -265,7 +265,7 @@ void (*pmap_copy_page_offs_func)(vm_paddr_t a_phys,
|
||||
int cnt);
|
||||
void (*pmap_zero_page_func)(vm_paddr_t, int, int);
|
||||
|
||||
struct msgbuf *msgbufp = 0;
|
||||
struct msgbuf *msgbufp = NULL;
|
||||
|
||||
/*
|
||||
* Crashdump maps.
|
||||
@ -842,7 +842,7 @@ pmap_alloc_l2_bucket(pmap_t pm, vm_offset_t va)
|
||||
ptep = uma_zalloc(l2zone, M_NOWAIT);
|
||||
rw_wlock(&pvh_global_lock);
|
||||
PMAP_LOCK(pm);
|
||||
if (l2b->l2b_kva != 0) {
|
||||
if (l2b->l2b_kva != NULL) {
|
||||
/* We lost the race. */
|
||||
l2->l2_occupancy--;
|
||||
uma_zfree(l2zone, ptep);
|
||||
|
@ -310,15 +310,15 @@ static pt2_entry_t *CMAP3;
|
||||
static caddr_t CADDR3;
|
||||
caddr_t _tmppt = 0;
|
||||
|
||||
struct msgbuf *msgbufp = 0; /* XXX move it to machdep.c */
|
||||
struct msgbuf *msgbufp = NULL; /* XXX move it to machdep.c */
|
||||
|
||||
/*
|
||||
* Crashdump maps.
|
||||
*/
|
||||
static caddr_t crashdumpmap;
|
||||
|
||||
static pt2_entry_t *PMAP1 = 0, *PMAP2;
|
||||
static pt2_entry_t *PADDR1 = 0, *PADDR2;
|
||||
static pt2_entry_t *PMAP1 = NULL, *PMAP2;
|
||||
static pt2_entry_t *PADDR1 = NULL, *PADDR2;
|
||||
#ifdef DDB
|
||||
static pt2_entry_t *PMAP3;
|
||||
static pt2_entry_t *PADDR3;
|
||||
|
@ -526,16 +526,16 @@ at91_mci_deactivate(device_t dev)
|
||||
sc = device_get_softc(dev);
|
||||
if (sc->intrhand)
|
||||
bus_teardown_intr(dev, sc->irq_res, sc->intrhand);
|
||||
sc->intrhand = 0;
|
||||
sc->intrhand = NULL;
|
||||
bus_generic_detach(sc->dev);
|
||||
if (sc->mem_res)
|
||||
bus_release_resource(dev, SYS_RES_MEMORY,
|
||||
rman_get_rid(sc->mem_res), sc->mem_res);
|
||||
sc->mem_res = 0;
|
||||
sc->mem_res = NULL;
|
||||
if (sc->irq_res)
|
||||
bus_release_resource(dev, SYS_RES_IRQ,
|
||||
rman_get_rid(sc->irq_res), sc->irq_res);
|
||||
sc->irq_res = 0;
|
||||
sc->irq_res = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -240,16 +240,16 @@ at91_pio_deactivate(device_t dev)
|
||||
sc = device_get_softc(dev);
|
||||
if (sc->intrhand)
|
||||
bus_teardown_intr(dev, sc->irq_res, sc->intrhand);
|
||||
sc->intrhand = 0;
|
||||
sc->intrhand = NULL;
|
||||
bus_generic_detach(sc->dev);
|
||||
if (sc->mem_res)
|
||||
bus_release_resource(dev, SYS_RES_MEMORY,
|
||||
rman_get_rid(sc->mem_res), sc->mem_res);
|
||||
sc->mem_res = 0;
|
||||
sc->mem_res = NULL;
|
||||
if (sc->irq_res)
|
||||
bus_release_resource(dev, SYS_RES_IRQ,
|
||||
rman_get_rid(sc->irq_res), sc->irq_res);
|
||||
sc->irq_res = 0;
|
||||
sc->irq_res = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -636,7 +636,7 @@ at91_pmc_deactivate(device_t dev)
|
||||
if (sc->mem_res)
|
||||
bus_release_resource(dev, SYS_RES_IOPORT,
|
||||
rman_get_rid(sc->mem_res), sc->mem_res);
|
||||
sc->mem_res = 0;
|
||||
sc->mem_res = NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -232,18 +232,18 @@ at91_rtc_deactivate(device_t dev)
|
||||
WR4(sc, RTC_IDR, 0xffffffff);
|
||||
if (sc->intrhand)
|
||||
bus_teardown_intr(dev, sc->irq_res, sc->intrhand);
|
||||
sc->intrhand = 0;
|
||||
sc->intrhand = NULL;
|
||||
#endif
|
||||
bus_generic_detach(sc->dev);
|
||||
if (sc->mem_res)
|
||||
bus_release_resource(dev, SYS_RES_MEMORY,
|
||||
rman_get_rid(sc->mem_res), sc->mem_res);
|
||||
sc->mem_res = 0;
|
||||
sc->mem_res = NULL;
|
||||
#ifdef AT91_RTC_USE_INTERRUPTS
|
||||
if (sc->irq_res)
|
||||
bus_release_resource(dev, SYS_RES_IRQ,
|
||||
rman_get_rid(sc->irq_res), sc->irq_res);
|
||||
sc->irq_res = 0;
|
||||
sc->irq_res = NULL;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
@ -193,16 +193,16 @@ at91_ssc_deactivate(device_t dev)
|
||||
sc = device_get_softc(dev);
|
||||
if (sc->intrhand)
|
||||
bus_teardown_intr(dev, sc->irq_res, sc->intrhand);
|
||||
sc->intrhand = 0;
|
||||
sc->intrhand = NULL;
|
||||
bus_generic_detach(sc->dev);
|
||||
if (sc->mem_res)
|
||||
bus_release_resource(dev, SYS_RES_IOPORT,
|
||||
rman_get_rid(sc->mem_res), sc->mem_res);
|
||||
sc->mem_res = 0;
|
||||
sc->mem_res = NULL;
|
||||
if (sc->irq_res)
|
||||
bus_release_resource(dev, SYS_RES_IRQ,
|
||||
rman_get_rid(sc->irq_res), sc->irq_res);
|
||||
sc->irq_res = 0;
|
||||
sc->irq_res = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -216,16 +216,16 @@ at91_twi_deactivate(device_t dev)
|
||||
sc = device_get_softc(dev);
|
||||
if (sc->intrhand)
|
||||
bus_teardown_intr(dev, sc->irq_res, sc->intrhand);
|
||||
sc->intrhand = 0;
|
||||
sc->intrhand = NULL;
|
||||
bus_generic_detach(sc->dev);
|
||||
if (sc->mem_res)
|
||||
bus_release_resource(dev, SYS_RES_MEMORY,
|
||||
rman_get_rid(sc->mem_res), sc->mem_res);
|
||||
sc->mem_res = 0;
|
||||
sc->mem_res = NULL;
|
||||
if (sc->irq_res)
|
||||
bus_release_resource(dev, SYS_RES_IRQ,
|
||||
rman_get_rid(sc->irq_res), sc->irq_res);
|
||||
sc->irq_res = 0;
|
||||
sc->irq_res = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1184,7 +1184,7 @@ atestart_locked(struct ifnet *ifp)
|
||||
}
|
||||
|
||||
IFQ_DRV_DEQUEUE(&ifp->if_snd, m);
|
||||
if (m == 0)
|
||||
if (m == NULL)
|
||||
break;
|
||||
|
||||
e = bus_dmamap_load_mbuf_sg(sc->mtag, sc->tx_map[sc->txhead], m,
|
||||
|
@ -1064,8 +1064,8 @@ clear_mac_entries(struct ece_softc *ec, int include_this_mac)
|
||||
struct mac_list * current;
|
||||
char mac[ETHER_ADDR_LEN];
|
||||
|
||||
current = 0;
|
||||
mac_list_header = 0;
|
||||
current = NULL;
|
||||
mac_list_header = NULL;
|
||||
|
||||
table_end = read_mac_entry(ec, mac, 1);
|
||||
while (!table_end) {
|
||||
@ -1608,7 +1608,7 @@ ece_encap(struct ece_softc *sc, struct mbuf *m0)
|
||||
struct ifnet *ifp;
|
||||
bus_dma_segment_t segs[MAX_FRAGMENT];
|
||||
bus_dmamap_t mapp;
|
||||
eth_tx_desc_t *desc = 0;
|
||||
eth_tx_desc_t *desc = NULL;
|
||||
int csum_flags;
|
||||
int desc_no;
|
||||
int error;
|
||||
|
@ -355,7 +355,7 @@ ixpqmgr_qconfig(int qId, int qEntries, int ne, int nf, int srcSel,
|
||||
if (cb == NULL) {
|
||||
/* Reset to dummy callback */
|
||||
qi->cb = dummyCallback;
|
||||
qi->cbarg = 0;
|
||||
qi->cbarg = NULL;
|
||||
} else {
|
||||
qi->cb = cb;
|
||||
qi->cbarg = cbarg;
|
||||
|
@ -250,7 +250,7 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid,
|
||||
}
|
||||
|
||||
rv = rman_reserve_resource(rm, start, end, count, flags, child);
|
||||
if (rv == 0)
|
||||
if (rv == NULL)
|
||||
return (NULL);
|
||||
|
||||
rman_set_rid(rv, *rid);
|
||||
|
Loading…
Reference in New Issue
Block a user