Skip to contentSkip to conversation

ata: sata_highbank: Fix section mismatch

PATCH In review Fabio Estevam 1 participant 2 messages Oct 7, 2012 – Oct 18, 2012 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: sata_highbank: Fix section mismatch

From: Fabio Estevam <[email protected]>

Building multi_v7_defconfig leads to the following warning:

WARNING: vmlinux.o(.data+0xf7d8): Section mismatch in reference from the variable ahci_highbank_driver to the function .init.text:ahci_highbank_probe() The variable ahci_highbank_driver references
the function __init ahci_highbank_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Fix it by annotating ahci_highbank_probe as __devinit.

---
 drivers/ata/sata_highbank.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/sata_highbank.c +1 -1
index 0d7c4c2..36a141a 100644
@@ -260,7 +260,7 @@ static const struct of_device_id ahci_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ahci_of_match);
 
-static int __init ahci_highbank_probe(struct platform_device *pdev)
+static int __devinit ahci_highbank_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct ahci_host_priv *hpriv;
Signature · 1 line
1.7.9.5
#1 lore raw

Jeff,

Quoted 4 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Building multi_v7_defconfig leads to the following warning:

Quoted 8 lines

WARNING: vmlinux.o(.data+0xf7d8): Section mismatch in reference from the variable ahci_highbank_driver to the function .init.text:ahci_highbank_probe() The variable ahci_highbank_driver references
the function __init ahci_highbank_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Fix it by annotating ahci_highbank_probe as __devinit.

Can this be applied, please?

Regards,

Fabio Estevam