Replace some more default range checks with RMAN_IS_DEFAULT_RANGE().

This is a follow-on to r295832.
This commit is contained in:
Justin Hibbits 2016-03-02 03:26:56 +00:00
parent 33c6a6670f
commit 82ed3cb0e4
5 changed files with 5 additions and 5 deletions

View File

@ -654,7 +654,7 @@ bhnd_generic_alloc_bhnd_resource(device_t dev, device_t child, int type,
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) {

View File

@ -710,7 +710,7 @@ generic_pcie_alloc_resource_ofw(device_t bus, device_t child, int type, int *rid
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)

View File

@ -495,7 +495,7 @@ puc_bus_alloc_resource(device_t dev, device_t child, int type, int *rid,
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)

View File

@ -263,7 +263,7 @@ quicc_bus_alloc_resource(device_t dev, device_t child, int type, int *rid,
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);

View File

@ -417,7 +417,7 @@ scc_bus_alloc_resource(device_t dev, device_t child, int type, int *rid,
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);