PCI: hotplug: compaq: drop X86 dependency
PATCH 1/1 PCI: hotplug: compaq: drop X86 dependency
This driver needs X86_32, not X86. It does not compile on x86_64 because of invalid assembly there.
PCI_BIOS already selects X86_32, so the explicit X86 dependency is redundant.
--- drivers/pci/hotplug/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/hotplug/Kconfig +1 -1
@@ -20,7 +20,7 @@ if HOTPLUG_PCI config HOTPLUG_PCI_COMPAQ tristate "Compaq PCI Hotplug driver" - depends on X86 && PCI_BIOS + depends on PCI_BIOS help Say Y here if you have a motherboard with a Compaq PCI Hotplug controller.
Signature · 1 line
2.54.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The commit message incorrectly describes Kconfig dependencies and build behavior, and the patch…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit message incorrectly describes Kconfig dependencies and build behavior, and the patch introduces a brittle implicit architecture dependency. --
commit dac4b501e3f9e9ff1b735ba64997762d448245d3
Author: Rosen Penev <[email protected]>
PCI: hotplug: compaq: drop X86 dependency
This commit removes the explicit X86 dependency for the Compaq PCI Hotplug driver. It relies on the PCI_BIOS dependency instead to limit the driver to 32-bit x86 systems.
Quoted 2 lines
This driver needs
X86_32, not X86. It does not compile onx86_64because of invalid assembly there.
Is this description accurate regarding the previous build behavior?
The previous dependency was "depends on X86 && PCI_BIOS". Since PCI_BIOS depends on X86_32 in arch/x86/Kconfig, it evaluates to false on x86_64. This means the driver was already prevented from compiling on x86_64 even before this change.
Quoted 1 line
PCI_BIOSalready selectsX86_32, so the explicit X86 dependency is redundant.
Does PCI_BIOS actually select X86_32?
Looking at arch/x86/Kconfig, PCI_BIOS is defined with "depends on X86_32", not "select X86_32". In Kconfig, select (reverse dependency) and depends on have fundamentally different semantics.
drivers/pci/hotplug/Kconfig if HOTPLUG_PCI · line 23
Quoted 10 lines
drivers/pci/hotplug/Kconfig +1
-1@@ -20,7 +20,7 @@ if HOTPLUG_PCI config HOTPLUG_PCI_COMPAQ tristate "Compaq PCI Hotplug driver" - depends on X86 && PCI_BIOS + depends on PCI_BIOS
Could removing the explicit architecture dependency entirely obscure the driver's hard architectural requirements?
Since the driver contains x86_32-specific inline assembly, relying on the transitive dependency of the PCI_BIOS feature flag might be brittle. Would it be safer and more explicit to change the dependency to
"depends on X86_32 && PCI_BIOS"?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1