Skip to content

Commit b9303bb

Browse files
zx2c4bjorn-helgaas
authored andcommitted
x86/PCI: Define to_pci_sysdata() even when !CONFIG_PCI
Recently, the to_pci_sysdata() helper was added inside the CONFIG_PCI guard, but it is used inside a CONFIG_NUMA guard, which does not require CONFIG_PCI. This breaks builds on !CONFIG_PCI machines. Make to_pci_sysdata() available in all configurations. Fixes: aad6aa0 ("x86/PCI: Add to_pci_sysdata() helper") Link: https://lore.kernel.org/r/[email protected] Reported-by: Randy Dunlap <[email protected]> Signed-off-by: Jason A. Donenfeld <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Acked-by: Randy Dunlap <[email protected]> # build-tested
1 parent d4e9056 commit b9303bb

File tree

1 file changed

+2
-2
lines changed
  • arch/x86/include/asm

1 file changed

+2
-2
lines changed

arch/x86/include/asm/pci.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ extern int pci_routeirq;
3333
extern int noioapicquirk;
3434
extern int noioapicreroute;
3535

36-
#ifdef CONFIG_PCI
37-
3836
static inline struct pci_sysdata *to_pci_sysdata(const struct pci_bus *bus)
3937
{
4038
return bus->sysdata;
4139
}
4240

41+
#ifdef CONFIG_PCI
42+
4343
#ifdef CONFIG_PCI_DOMAINS
4444
static inline int pci_domain_nr(struct pci_bus *bus)
4545
{

0 commit comments

Comments
 (0)