mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Kelley <mhkelley58@gmail.com>
To: rafael@kernel.org, lenb@kernel.org, bhelgaas@google.com
Cc: linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org
Subject: [PATCH 1/1] PCI/ACPI: Remove Hyper-V special case in pcibios_root_bridge_prepare()
Date: Tue, 29 Sep 2026 11:10:56 -0700	[thread overview]
Message-ID: <20260929181056.4746-1-mhklinux@outlook.com> (raw)

pcibios_root_bridge_prepare() currently has code to handle Hyper-V
guest root bridges with the sysdata parent field set to NULL. While
this special case existed when commit 7d40c0f70d92 ("arm64: PCI:
Support root bridge preparation for Hyper-V") was accepted, more
recent commit 8d21732475c6 ("PCI: hv: Propagate coherence from VMbus
device to PCI device") always sets the sysdata parent field to a
non-NULL value.

No harm is caused by leaving the special case in place, even
though it is no longer needed. But in the interest of overall
code cleanliness, remove it.

Signed-off-by: Michael Kelley <mhklinux@outlook.com>
---
This patch does not just do a revert of 7d40c0f70d92 because
an intervening commit moved the code to a new source code
file.

 drivers/pci/pci-acpi.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 42d545edd7fa..452a90317c58 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -1572,17 +1572,7 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
 		return 0;
 
 	cfg = bridge->bus->sysdata;
-
-	/*
-	 * On Hyper-V there is no corresponding ACPI device for a root bridge,
-	 * therefore ->parent is set as NULL by the driver. And set 'adev' as
-	 * NULL in this case because there is no proper ACPI device.
-	 */
-	if (!cfg->parent)
-		adev = NULL;
-	else
-		adev = to_acpi_device(cfg->parent);
-
+	adev = to_acpi_device(cfg->parent);
 	bus_dev = &bridge->bus->dev;
 
 	ACPI_COMPANION_SET(&bridge->dev, adev);
-- 
2.25.1


             reply	other threads:[~2026-09-29 18:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 18:10 Michael Kelley [this message]
2026-09-29 18:23 ` Rafael J. Wysocki (Intel)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260929181056.4746-1-mhklinux@outlook.com \
    --to=mhkelley58@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mhklinux@outlook.com \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®