Re: [PATCH v13 2/5] PCI: Assume control of portdrv-related features only when portdrv enabled
From: Lukas Wunner
Date: Sun Sep 20 2026 - 02:17:36 EST
On Sat, Sep 19, 2026 at 09:26:52AM -0700, Kuppuswamy Sathyanarayanan wrote:
> +++ b/drivers/pci/probe.c
> @@ -668,12 +668,14 @@ static void pci_init_host_bridge(struct pci_host_bridge *bridge)
> * may implement its own AER handling and use _OSC to prevent the
> * OS from interfering.
> */
> +#ifdef CONFIG_PCIEPORTBUS
> bridge->native_aer = 1;
> bridge->native_pcie_hotplug = 1;
> - bridge->native_shpc_hotplug = 1;
> bridge->native_pme = 1;
> - bridge->native_ltr = 1;
> bridge->native_dpc = 1;
> +#endif
> + bridge->native_ltr = 1;
> + bridge->native_shpc_hotplug = 1;
> bridge->domain_nr = PCI_DOMAIN_NR_NOT_SET;
How about (e.g.)
bridge->native_pcie_hotplug = IS_ENABLED(CONFIG_PCIEPORTBUS);
instead of using #ifdef? That's the preferred style according to
section 21 of Documentation/process/coding-style.rst
> bridge->native_cxl_error = 1;
Hm, this one depends on CONFIG_PCIEAER I believe.
(But Terry Bowman is the expert.)
Thanks,
Lukas