Replace some more default range checks with RMAN_IS_DEFAULT_RANGE().
This is a follow-on to r295832.
This commit is contained in:
parent
33c6a6670f
commit
82ed3cb0e4
@ -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) {
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user