aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/bhnd/bhnd.c2
-rw-r--r--sys/dev/pci/pci_host_generic.c2
-rw-r--r--sys/dev/puc/puc.c2
-rw-r--r--sys/dev/quicc/quicc_core.c2
-rw-r--r--sys/dev/scc/scc_core.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/bhnd/bhnd.c b/sys/dev/bhnd/bhnd.c
index ec684dfc4b81..674094aa17d5 100644
--- a/sys/dev/bhnd/bhnd.c
+++ b/sys/dev/bhnd/bhnd.c
@@ -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) {
diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c
index 8677462641f8..8335383111e2 100644
--- a/sys/dev/pci/pci_host_generic.c
+++ b/sys/dev/pci/pci_host_generic.c
@@ -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)
diff --git a/sys/dev/puc/puc.c b/sys/dev/puc/puc.c
index 75736d1caef0..d3b14fb8f9ab 100644
--- a/sys/dev/puc/puc.c
+++ b/sys/dev/puc/puc.c
@@ -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)
diff --git a/sys/dev/quicc/quicc_core.c b/sys/dev/quicc/quicc_core.c
index 013b24260aa9..b0e22b4e5913 100644
--- a/sys/dev/quicc/quicc_core.c
+++ b/sys/dev/quicc/quicc_core.c
@@ -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);
diff --git a/sys/dev/scc/scc_core.c b/sys/dev/scc/scc_core.c
index 905fc64ea153..4471b9a20f72 100644
--- a/sys/dev/scc/scc_core.c
+++ b/sys/dev/scc/scc_core.c
@@ -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);