svn commit: r296298 - in head/sys/dev: bhnd pci puc quicc scc
Justin Hibbits
jhibbits at FreeBSD.org
Wed Mar 2 03:26:58 UTC 2016
Author: jhibbits
Date: Wed Mar 2 03:26:56 2016
New Revision: 296298
URL: https://svnweb.freebsd.org/changeset/base/296298
Log:
Replace some more default range checks with RMAN_IS_DEFAULT_RANGE().
This is a follow-on to r295832.
Modified:
head/sys/dev/bhnd/bhnd.c
head/sys/dev/pci/pci_host_generic.c
head/sys/dev/puc/puc.c
head/sys/dev/quicc/quicc_core.c
head/sys/dev/scc/scc_core.c
Modified: head/sys/dev/bhnd/bhnd.c
==============================================================================
--- head/sys/dev/bhnd/bhnd.c Wed Mar 2 03:19:59 2016 (r296297)
+++ head/sys/dev/bhnd/bhnd.c Wed Mar 2 03:26:56 2016 (r296298)
@@ -654,7 +654,7 @@ bhnd_generic_alloc_bhnd_resource(device_
bool passthrough;
passthrough = (device_get_parent(child) != dev);
- isdefault = (start == 0UL && end == ~0UL);
+ isdefault = RMAN_IS_DEFAULT_RANGE(start, end);
/* the default RID must always be the first device port/region. */
if (!passthrough && *rid == 0) {
Modified: head/sys/dev/pci/pci_host_generic.c
==============================================================================
--- head/sys/dev/pci/pci_host_generic.c Wed Mar 2 03:19:59 2016 (r296297)
+++ head/sys/dev/pci/pci_host_generic.c Wed Mar 2 03:26:56 2016 (r296298)
@@ -710,7 +710,7 @@ generic_pcie_alloc_resource_ofw(device_t
sc = device_get_softc(bus);
- if ((start == 0UL) && (end == ~0UL)) {
+ if (RMAN_IS_DEFAULT_RANGE(start, end)) {
if ((di = device_get_ivars(child)) == NULL)
return (NULL);
if (type == SYS_RES_IOPORT)
Modified: head/sys/dev/puc/puc.c
==============================================================================
--- head/sys/dev/puc/puc.c Wed Mar 2 03:19:59 2016 (r296297)
+++ head/sys/dev/puc/puc.c Wed Mar 2 03:26:56 2016 (r296298)
@@ -495,7 +495,7 @@ puc_bus_alloc_resource(device_t dev, dev
return (NULL);
/* We only support default allocations. */
- if (start != 0UL || end != ~0UL)
+ if (!RMAN_IS_DEFAULT_RANGE(start, end))
return (NULL);
if (type == port->p_bar->b_type)
Modified: head/sys/dev/quicc/quicc_core.c
==============================================================================
--- head/sys/dev/quicc/quicc_core.c Wed Mar 2 03:19:59 2016 (r296297)
+++ head/sys/dev/quicc/quicc_core.c Wed Mar 2 03:26:56 2016 (r296298)
@@ -263,7 +263,7 @@ quicc_bus_alloc_resource(device_t dev, d
return (NULL);
/* We only support default allocations. */
- if (start != 0UL || end != ~0UL)
+ if (!RMAN_IS_DEFAULT_RANGE(start, end))
return (NULL);
qd = device_get_ivars(child);
Modified: head/sys/dev/scc/scc_core.c
==============================================================================
--- head/sys/dev/scc/scc_core.c Wed Mar 2 03:19:59 2016 (r296297)
+++ head/sys/dev/scc/scc_core.c Wed Mar 2 03:26:56 2016 (r296298)
@@ -417,7 +417,7 @@ scc_bus_alloc_resource(device_t dev, dev
return (NULL);
/* We only support default allocations. */
- if (start != 0UL || end != ~0UL)
+ if (!RMAN_IS_DEFAULT_RANGE(start, end))
return (NULL);
m = device_get_ivars(child);
More information about the svn-src-all
mailing list