From nobody Tue Oct 29 11:14:45 2024 X-Original-To: dev-commits-src-all@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 4Xd72F6qbLz5bKZf; Tue, 29 Oct 2024 11:14:45 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xd72F6Hdpz3wtb; Tue, 29 Oct 2024 11:14:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730200485; 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=fNRbhQbqafwltGrqaQ0uY8nXkOrz6CHKkXQM147Irqs=; b=KHtbA1M9d1Tr/a4XdYRmd5n1QO89Cy80TTFEx5FkUf+wXdj0X41uWGdE76YCCtBqe7wiiD CH4pkA7pzfaHo1PsCIZA//4N5IFeeWH8yxIMyHbiE3Y1js4HkapIQvjq5mZJXx6tDaqCMs +cEtFdprdB9isvohn41sKBw+GCfijHzDq5l/POLA2NmlMADML27efBlUtn7tRj6A5J0UfH /ew06Fg2xUJPQFC2KkSg54ij1dL+cqXqOpZN4lA/0OJS2LnfTNYekPf6ijoCPQAIfF9JO9 i0mCmhfP9gYROP/VG9Evz2FNYhHjf8Wb2GbfkfuqLbIHbqpa4M8f1Y5v8y5/Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730200485; 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=fNRbhQbqafwltGrqaQ0uY8nXkOrz6CHKkXQM147Irqs=; b=Zby52d2Ay70AlQKsPMqtWpntrcqa70tf5ubhxUMzRp9IOFgkOErRpxcSy8bEEPfwO0XvtZ DcPlwhPDqCxAJQ5c0Rppwl7Cg5uA2naJEAfGSNhvKvqBrSQBUvDbchU9sLXxUQD4kjAjQ3 10aZo1TOCw36sPd9Whd2f6LMhs1DOIOh7FiXhlbpi2yExNPHX5RLTSQCunfl/GtOmySr/J BR3KkzZgmBUsoVt2mLEFjfVNVNW8JTaA0oJckGDOWKQsiDRqNXM6D4mrCfm5/vhoJsfhx2 bi9WJ4h4LJiFRSAYiDK5zToS/PKi/q/vv3g6stayhWdeLs7DnTjWt/CZgDBWfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730200485; a=rsa-sha256; cv=none; b=aK36cF7QhbAMbl35enmcmK3rBW5Iivl3u+Bc7BjTbZXE9REgFvgBJpRl+21zZd2AVZ1bXp TueJkywwPyJ5G1SVlfxGs7RpPIwoPTZqHidi5un+f0pX/wvWxb+epFCX9as/9gbKTFuYMS 7+zwpCV2tyu7DlzgXJA/u2s6mAF2t2IWQc19oo1zLjQJFdt7Kwlz/ns0qBt428kY6/6KmZ 2H9K7ELys9TeKrpz5MU1d93a4Fi+HWZo9dMYdSAgxuuV8f1xHzhxRJJKhEE9xc+oClV8AP aPjZcy6CXi3NvYimduhmOlVtNjc+ObayftT+NcA7c/Q+0LWNWos/SrhwSHDBOw== 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 4Xd72F5s9HzLhK; Tue, 29 Oct 2024 11:14:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49TBEjo1075646; Tue, 29 Oct 2024 11:14:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49TBEjic075643; Tue, 29 Oct 2024 11:14:45 GMT (envelope-from git) Date: Tue, 29 Oct 2024 11:14:45 GMT Message-Id: <202410291114.49TBEjic075643@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: d652801574f7 - main - bus: Fix the non-debug build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d652801574f7b1aaf2a9345840861ce5d3768c85 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=d652801574f7b1aaf2a9345840861ce5d3768c85 commit d652801574f7b1aaf2a9345840861ce5d3768c85 Author: Andrew Turner AuthorDate: 2024-10-29 11:06:57 +0000 Commit: Andrew Turner CommitDate: 2024-10-29 11:06:57 +0000 bus: Fix the non-debug build We read the rman type twice. Replace the second call to rman_get_type with the value we already have. Reported by: bapt, Herbert J. Skuhra Sponsored by: Arm Ltd --- sys/kern/subr_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 681971df4307..8fec2b3de139 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -4367,7 +4367,7 @@ bus_generic_rman_activate_resource(device_t dev, device_t child, if (error != 0) return (error); - switch (rman_get_type(r)) { + switch (type) { case SYS_RES_IOPORT: case SYS_RES_MEMORY: if ((rman_get_flags(r) & RF_UNMAPPED) == 0) {