Skip to contentSkip to conversation

ARM: tegra: fix compile-testing PCI host driver

PATCH Applied Arnd Bergmann 4 participants 4 messages May 28, 2018 – Jun 2, 2018 Tegra architecture support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: tegra: fix compile-testing PCI host driver

The tegra_cpuidle_pcie_irqs_in_use() function is stubbed out for non-ARM builds, but now we can compile-test the Tegra pci driver on non-Tegra ARM platforms as well, which results in a new link error:

drivers/pci/host/pci-tegra.o: In function `tegra_pcie_map_irq':
pci-tegra.c:(.text+0x288): undefined reference to tegra_cpuidle_pcie_irqs_in_use' drivers/pci/host/pci-tegra.o: In function tegra_msi_map':
pci-tegra.c:(.text+0xba0): undefined reference to `tegra_cpuidle_pcie_irqs_in_use'

This adapts the #ifdef statement to match the exact condition under which the function can be called.

Fixes 51bc085d6454 ("PCI: Improve host drivers compile test coverage")
Cc Rob Herring <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
---
 include/soc/tegra/cpuidle.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/soc/tegra/cpuidle.h +1 -1
index 1fae9c7800d1..b6cf32211520 100644
@@ -14,7 +14,7 @@
 #ifndef __SOC_TEGRA_CPUIDLE_H__
 #define __SOC_TEGRA_CPUIDLE_H__
 
-#if defined(CONFIG_ARM) && defined(CONFIG_CPU_IDLE)
+#if defined(CONFIG_ARM) && defined(CONFIG_ARCH_TEGRA) && defined(CONFIG_CPU_IDLE)
 void tegra_cpuidle_pcie_irqs_in_use(void);
 #else
 static inline void tegra_cpuidle_pcie_irqs_in_use(void)
Signature · 1 line
2.9.0
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Arnd Bergmann

The tegra_cpuidle_pcie_irqs_in_use() function is stubbed out for non-ARM builds, but now we can compile-test the Tegra pci driver on non-Tegra ARM platforms as well, which results in a new link error:

drivers/pci/host/pci-tegra.o: In function `tegra_pcie_map_irq':
pci-tegra.c:(.text+0x288): undefined reference to tegra_cpuidle_pcie_irqs_in_use' drivers/pci/host/pci-tegra.o: In function tegra_msi_map':
pci-tegra.c:(.text+0xba0): undefined reference to `tegra_cpuidle_pcie_irqs_in_use'

This adapts the #ifdef statement to match the exact condition under which the function can be called.

Quoted 7 lines
Fixes 51bc085d6454 ("PCI: Improve host drivers compile test coverage")
Cc Rob Herring <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
---
 include/soc/tegra/cpuidle.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by on v1 1/1
#2 lore raw
In reply to Arnd Bergmann
Quoted 12 lines · Arnd Bergmann

The tegra_cpuidle_pcie_irqs_in_use() function is stubbed out for non-ARM builds, but now we can compile-test the Tegra pci driver on non-Tegra ARM platforms as well, which results in a new link error:

drivers/pci/host/pci-tegra.o: In function `tegra_pcie_map_irq':
pci-tegra.c:(.text+0x288): undefined reference to tegra_cpuidle_pcie_irqs_in_use' drivers/pci/host/pci-tegra.o: In function tegra_msi_map':
pci-tegra.c:(.text+0xba0): undefined reference to `tegra_cpuidle_pcie_irqs_in_use'

This adapts the #ifdef statement to match the exact condition under which the function can be called.

Quoted 7 lines
Fixes 51bc085d6454 ("PCI: Improve host drivers compile test coverage")
Cc Rob Herring <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
---
 include/soc/tegra/cpuidle.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#3 lore raw
In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

The tegra_cpuidle_pcie_irqs_in_use() function is stubbed out for non-ARM builds, but now we can compile-test the Tegra pci driver on non-Tegra ARM platforms as well, which results in a new link error:

drivers/pci/host/pci-tegra.o: In function `tegra_pcie_map_irq':
pci-tegra.c:(.text+0x288): undefined reference to tegra_cpuidle_pcie_irqs_in_use' drivers/pci/host/pci-tegra.o: In function tegra_msi_map':
pci-tegra.c:(.text+0xba0): undefined reference to `tegra_cpuidle_pcie_irqs_in_use'

Quoted 7 lines

This adapts the #ifdef statement to match the exact condition under which the function can be called.

Fixes 51bc085d6454 ("PCI: Improve host drivers compile test coverage")
Cc Rob Herring <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>

Applied, thanks!

-Olof