aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2023-10-20 21:53:49 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2023-10-24 19:19:59 +0000
commitcb63a64b8c833930628eb4a93f01956ef6e49d7c (patch)
treedc042590cfbdf5f558317a07e8843ac5f58fe364
parent89160477956bf3dff2faa7eeedd0d67fb7a60efe (diff)
acpi_pcib: Rename decoded_bus_range to get_decoded_bus_range
While here, change the return value to bool. Discussed by: gibbs (cherry picked from commit f6c2774fe415f3b79c551b8075c159d6a7d4d0bf)
-rw-r--r--sys/dev/acpica/acpi_pcib_acpi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c
index 02e3a0be5956..a66ca1199af7 100644
--- a/sys/dev/acpica/acpi_pcib_acpi.c
+++ b/sys/dev/acpica/acpi_pcib_acpi.c
@@ -288,18 +288,18 @@ acpi_pcib_producer_handler(ACPI_RESOURCE *res, void *context)
#endif
#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
-static int
-decoded_bus_range(struct acpi_hpcib_softc *sc, rman_res_t *startp,
+static bool
+get_decoded_bus_range(struct acpi_hpcib_softc *sc, rman_res_t *startp,
rman_res_t *endp)
{
struct resource_list_entry *rle;
rle = resource_list_find(&sc->ap_host_res.hr_rl, PCI_RES_BUS, 0);
if (rle == NULL)
- return (ENXIO);
+ return (false);
*startp = rle->start;
*endp = rle->end;
- return (0);
+ return (true);
}
#endif
@@ -497,7 +497,7 @@ acpi_pcib_acpi_attach(device_t dev)
* If we have a region of bus numbers, use the first
* number for our bus.
*/
- if (decoded_bus_range(sc, &start, &end) == 0)
+ if (get_decoded_bus_range(sc, &start, &end))
sc->ap_bus = start;
else {
rid = 0;
@@ -517,7 +517,7 @@ acpi_pcib_acpi_attach(device_t dev)
* If there is a decoded bus range, assume the bus number is
* the first value in the range. Warn if _BBN doesn't match.
*/
- if (decoded_bus_range(sc, &start, &end) == 0) {
+ if (get_decoded_bus_range(sc, &start, &end)) {
if (sc->ap_bus != start) {
device_printf(dev,
"WARNING: BIOS configured bus number (%d) is "