Skip to contentSkip to conversation

depca: Fix section mismatch derived from depca_isa_driver variable

PATCH In review Sedat Dilek 2 participants 3 messages Jan 3, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 depca: Fix section mismatch derived from depca_isa_driver variable

Quoted 1 line

From my build.log:

WARNING: drivers/net/depca.o(.data+0x0): Section mismatch in reference from the variable depca_isa_driver to the function .init.text:depca_isa_probe() The variable depca_isa_driver references
the function __init depca_isa_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,

This patch fixes the warning.

Tested with linux-next (next-20101231)

---
 drivers/net/depca.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/depca.c +1 -1
index 91b3846..dfaf746 100644
@@ -405,7 +405,7 @@ static int __devexit depca_isa_remove(struct platform_device *pdev)
 	return depca_device_remove(&pdev->dev);
 }
 
-static struct platform_driver depca_isa_driver = {
+static struct platform_driver depca_isa_driver __refdata = {
 	.probe  = depca_isa_probe,
 	.remove = __devexit_p(depca_isa_remove),
 	.driver	= {
Signature · 1 line
1.7.4.rc0
maintainer
#1 lore raw

From: Sedat Dilek <[email protected]>
Date: Mon, 3 Jan 2011 03:33:07 +0100

Quoted 9 lines
Quoted 1 line

From my build.log:

WARNING: drivers/net/depca.o(.data+0x0): Section mismatch in reference from the variable depca_isa_driver to the function .init.text:depca_isa_probe() The variable depca_isa_driver references
the function __init depca_isa_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,

Quoted 5 lines

This patch fixes the warning.

Tested with linux-next (next-20101231)

Again, mark depca_isa_probe() as __devinit to fix this bug.

#2 lore raw
Quoted 12 lines · David Miller

From: Sedat Dilek <[email protected]>
Date: Mon,  3 Jan 2011 03:33:07 +0100

Quoted 9 lines
Quoted 1 line

From my build.log:

WARNING: drivers/net/depca.o(.data+0x0): Section mismatch in reference from the variable depca_isa_driver to the function .init.text:depca_isa_probe() The variable depca_isa_driver references
the function __init depca_isa_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,

Quoted 8 lines
Quoted 5 lines

This patch fixes the warning.

Tested with linux-next (next-20101231)

Again, mark depca_isa_probe() as __devinit to fix this bug.

Thanks for the pointer, I have sent a new fixed version.

- Sedat -