From nobody Fri Oct 20 21:54:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SByzg0fLDz4yGlf; Fri, 20 Oct 2023 21:54:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SByzg09L4z4gG8; Fri, 20 Oct 2023 21:54:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697838879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KDwieO9e/iu1uy/z9qGKQGO3IdpLSiqmhD9RRQLx8SY=; b=ZdT1XIWlszp4NAi8zjqued/TG0A8qG6nZ/6ZcmTdDZtAL55+nIiEPLESkhIuFI/6VYL1P5 s4pPXgq2Gr7c6dJzoZcJVQdLh7bWm3pYwR+lHDwdvhQvb5I6jxEhnP3GqpxCc46uLUcfj6 ygcqLws2KtdS0jfsKWiCfhJTidz3i5K50x5BteWrCmTybaohLqwYD0COsoyeYA6+e17tLi vqzz0gcxLf9ba/2WehhGkTP+hqoTDRAnkY7ZKa1anPjvJNLR1hFCUs0awNc4clfN+QAtqd 2SRFI8tGkDFCpJ8m0AAfPMQ1eCngpFDCMK23FA9FhhmXpb0uA1ypedrz+vx4KQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697838879; a=rsa-sha256; cv=none; b=hujvN59SWQKcMaWZv0NE2asDtKQ3TDM3IXSfurek76xOc4B6LUv6O9+WyIRgsjWdid1iqj GUY8rk3n3v07roDHc8ic6NKUzmgLWSvAnV7fw9B9LDMBliZxZVYbVKmpL5PEKGwfzpL1qf JkmbyTHY5tojOXLitpqYetfc2k3/6LLms2oVXlGTugJEfwDQBPvo0UsXOGo3Awi9dBKlS9 ePmnG0q2sUEt0+G+1s6li2VmqZd8atV0YIZ36Gi347TPKcqWfv57mWNQCoIkVLOeNXaL/m +4sPTfqoVSh0jTf2zhiBA7mIbanHBrxT201PFOM99Los4HsQL2AY2wLtzWsfiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697838879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KDwieO9e/iu1uy/z9qGKQGO3IdpLSiqmhD9RRQLx8SY=; b=LZkSwHubl8sOsaIlq6eMA2M++gY7b1hoZMPFAwkjqFw3Ob3csFUlTTyJeqXgyWsFzBUfBD i96KDCpbt7avVYsJII0VrHFRSn+ubpF8jleyfdzNxJhGi6d2e7GP+DyI/dOW2gSmTJ8o4Y Cj+p0EhUWbzNj8YpVQs3BUdm8xuPKAZoN/3Ady0fBL5/J/ZkGkTFveTskhZUkz+NegheeG WoQKRtmgZ5wijWOQWdD5th7bZ7eUCmcNEe+oWVDNvfGihjQJWUKoC6HX6Cvp5JN0TypKVR hN4ovZbS2Xzpowx6aN38ye+Ay2M+6V1NOpnOafyGZmyZS8x1R4jzm7CdCB4mjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SByzf699dzqCw; Fri, 20 Oct 2023 21:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39KLsc4x022161; Fri, 20 Oct 2023 21:54:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39KLscvU022158; Fri, 20 Oct 2023 21:54:38 GMT (envelope-from git) Date: Fri, 20 Oct 2023 21:54:38 GMT Message-Id: <202310202154.39KLscvU022158@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f6c2774fe415 - main - acpi_pcib: Rename decoded_bus_range to get_decoded_bus_range List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f6c2774fe415f3b79c551b8075c159d6a7d4d0bf Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f6c2774fe415f3b79c551b8075c159d6a7d4d0bf commit f6c2774fe415f3b79c551b8075c159d6a7d4d0bf Author: John Baldwin AuthorDate: 2023-10-20 21:53:49 +0000 Commit: John Baldwin CommitDate: 2023-10-20 21:53:49 +0000 acpi_pcib: Rename decoded_bus_range to get_decoded_bus_range While here, change the return value to bool. Discussed by: gibbs --- 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 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 "