git: c4dfacd0b3c3 - stable/13 - acpi_pcib: Rename decoded_bus_range to get_decoded_bus_range

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Tue, 24 Oct 2023 19:25:59 UTC
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=c4dfacd0b3c3203beb0609f05ddecb8dab7b09a2

commit c4dfacd0b3c3203beb0609f05ddecb8dab7b09a2
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-10-20 21:53:49 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-10-24 19:20:02 +0000

    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)
---
 sys/dev/acpica/acpi_pcib_acpi.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c
index c3fbd25c3929..e2b3bfa6374d 100644
--- a/sys/dev/acpica/acpi_pcib_acpi.c
+++ b/sys/dev/acpica/acpi_pcib_acpi.c
@@ -290,18 +290,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
 
@@ -498,7 +498,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;
@@ -518,7 +518,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 "