Author: pfg Date: Fri Apr 15 14:26:24 2016 New Revision: 298053 URL: https://svnweb.freebsd.org/changeset/base/298053
Log: mips: for pointers replace 0 with NULL. These are mostly cosmetical, no functional change. Found with devel/coccinelle. Reviewed by: adrian Modified: head/sys/mips/adm5120/obio.c head/sys/mips/alchemy/obio.c head/sys/mips/atheros/apb.c head/sys/mips/idt/obio.c head/sys/mips/mips/machdep.c head/sys/mips/mips/nexus.c head/sys/mips/nlm/xlp_simplebus.c head/sys/mips/rmi/xlr_pci.c head/sys/mips/rt305x/obio.c head/sys/mips/rt305x/rt305x_gpio.c Modified: head/sys/mips/adm5120/obio.c ============================================================================== --- head/sys/mips/adm5120/obio.c Fri Apr 15 14:25:13 2016 (r298052) +++ head/sys/mips/adm5120/obio.c Fri Apr 15 14:26:24 2016 (r298053) @@ -270,7 +270,7 @@ obio_alloc_resource(device_t bus, device } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { printf("%s: could not reserve resource\n", __func__); return (0); } Modified: head/sys/mips/alchemy/obio.c ============================================================================== --- head/sys/mips/alchemy/obio.c Fri Apr 15 14:25:13 2016 (r298052) +++ head/sys/mips/alchemy/obio.c Fri Apr 15 14:26:24 2016 (r298053) @@ -271,7 +271,7 @@ obio_alloc_resource(device_t bus, device } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { printf("%s: could not reserve resource\n", __func__); return (0); } Modified: head/sys/mips/atheros/apb.c ============================================================================== --- head/sys/mips/atheros/apb.c Fri Apr 15 14:25:13 2016 (r298052) +++ head/sys/mips/atheros/apb.c Fri Apr 15 14:26:24 2016 (r298053) @@ -223,7 +223,7 @@ apb_alloc_resource(device_t bus, device_ } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { printf("%s: could not reserve resource\n", __func__); return (0); } Modified: head/sys/mips/idt/obio.c ============================================================================== --- head/sys/mips/idt/obio.c Fri Apr 15 14:25:13 2016 (r298052) +++ head/sys/mips/idt/obio.c Fri Apr 15 14:26:24 2016 (r298053) @@ -204,7 +204,7 @@ obio_alloc_resource(device_t bus, device } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { printf("%s: could not reserve resource\n", __func__); return (0); } Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Fri Apr 15 14:25:13 2016 (r298052) +++ head/sys/mips/mips/machdep.c Fri Apr 15 14:26:24 2016 (r298053) @@ -316,7 +316,7 @@ cpu_initclocks(void) cpu_initclocks_bsp(); } -struct msgbuf *msgbufp=0; +struct msgbuf *msgbufp = NULL; /* * Initialize the hardware exception vectors, and the jump table used to Modified: head/sys/mips/mips/nexus.c ============================================================================== --- head/sys/mips/mips/nexus.c Fri Apr 15 14:25:13 2016 (r298052) +++ head/sys/mips/mips/nexus.c Fri Apr 15 14:26:24 2016 (r298053) @@ -315,7 +315,7 @@ nexus_alloc_resource(device_t bus, devic } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { printf("%s: could not reserve resource for %s\n", __func__, device_get_nameunit(child)); return (0); Modified: head/sys/mips/nlm/xlp_simplebus.c ============================================================================== --- head/sys/mips/nlm/xlp_simplebus.c Fri Apr 15 14:25:13 2016 (r298052) +++ head/sys/mips/nlm/xlp_simplebus.c Fri Apr 15 14:26:24 2016 (r298053) @@ -244,7 +244,7 @@ xlp_simplebus_alloc_resource(device_t bu } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { device_printf(bus, "%s: could not reserve resource for %s\n", __func__, device_get_nameunit(child)); return (NULL); Modified: head/sys/mips/rmi/xlr_pci.c ============================================================================== --- head/sys/mips/rmi/xlr_pci.c Fri Apr 15 14:25:13 2016 (r298052) +++ head/sys/mips/rmi/xlr_pci.c Fri Apr 15 14:26:24 2016 (r298053) @@ -537,7 +537,7 @@ xlr_pci_alloc_resource(device_t bus, dev } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) + if (rv == NULL) return (0); rman_set_rid(rv, *rid); Modified: head/sys/mips/rt305x/obio.c ============================================================================== --- head/sys/mips/rt305x/obio.c Fri Apr 15 14:25:13 2016 (r298052) +++ head/sys/mips/rt305x/obio.c Fri Apr 15 14:26:24 2016 (r298053) @@ -326,7 +326,7 @@ obio_alloc_resource(device_t bus, device } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { printf("%s: could not reserve resource\n", __func__); return (0); } Modified: head/sys/mips/rt305x/rt305x_gpio.c ============================================================================== --- head/sys/mips/rt305x/rt305x_gpio.c Fri Apr 15 14:25:13 2016 (r298052) +++ head/sys/mips/rt305x/rt305x_gpio.c Fri Apr 15 14:26:24 2016 (r298053) @@ -562,7 +562,7 @@ rt305x_gpio_alloc_resource(device_t bus, } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) { + if (rv == NULL) { printf("%s: could not reserve resource\n", __func__); return (0); } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"