public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/2] PCI: spear: Fix Section mismatch compilation warning for probe()
@ 2014-07-20 11:59 Viresh Kumar
  2014-07-20 11:59 ` [PATCH 2/2] PCI: spear: Remove spear13xx_pcie_remove() Viresh Kumar
  2014-07-20 19:26 ` [PATCH 1/2] PCI: spear: Fix Section mismatch compilation warning for probe() Olof Johansson
  0 siblings, 2 replies; 8+ messages in thread
From: Viresh Kumar @ 2014-07-20 11:59 UTC (permalink / raw)
  To: linux-arm-kernel

Following compilation warning occurs when compiled with:
CONFIG_DEBUG_SECTION_MISMATCH=y

 WARNING: drivers/pci/host/built-in.o(.data+0xc0): Section mismatch in
 reference from the variable spear13xx_pcie_driver to the function
 .init.text:spear13xx_pcie_probe()

Both .probe() and pcie_init() are marked with __init, but spear13xx_pcie_driver
isn't. And so section mismatch.

Fix it by marking spear13xx_pcie_driver with __initdata.

Fixes: 51b66a6 (PCI: spear: Add PCIe driver for ST Microelectronics SPEAr13xx)
Reported-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
Olof/Arnd,

Let me know if a PULL request is required for this, otherwise just apply them
directly.

 drivers/pci/host/pcie-spear13xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/host/pcie-spear13xx.c b/drivers/pci/host/pcie-spear13xx.c
index 99738e4..67315ea 100644
--- a/drivers/pci/host/pcie-spear13xx.c
+++ b/drivers/pci/host/pcie-spear13xx.c
@@ -382,7 +382,7 @@ static const struct of_device_id spear13xx_pcie_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, spear13xx_pcie_of_match);
 
-static struct platform_driver spear13xx_pcie_driver = {
+static struct platform_driver spear13xx_pcie_driver __initdata = {
 	.probe		= spear13xx_pcie_probe,
 	.remove		= spear13xx_pcie_remove,
 	.driver = {
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-07-21  4:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-20 11:59 [PATCH 1/2] PCI: spear: Fix Section mismatch compilation warning for probe() Viresh Kumar
2014-07-20 11:59 ` [PATCH 2/2] PCI: spear: Remove spear13xx_pcie_remove() Viresh Kumar
2014-07-20 19:26 ` [PATCH 1/2] PCI: spear: Fix Section mismatch compilation warning for probe() Olof Johansson
2014-07-21  0:12   ` Viresh Kumar
2014-07-21  0:21     ` Olof Johansson
2014-07-21  0:27       ` Viresh Kumar
2014-07-21  2:15     ` Rob Herring
2014-07-21  4:28       ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox