depca: Fix section mismatch derived from depca_isa_driver variable
Subsystems (2)
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
@@ -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
David Miller
maintainerFrom: 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_driverto the function .init.text:depca_isa_probe() The variabledepca_isa_driverreferences
the function__initdepca_isa_probe()
If the reference is valid then annotate the
variable with __init* or__refdata(seelinux/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)
Signed-off-by Sedat Dilek <[email protected]>
Again, mark depca_isa_probe() as __devinit to fix this bug.
Quoted 12 lines · David Miller
From: Sedat Dilek <[email protected]>
Date: Mon, 3 Jan 2011 03:33:07 +0100Quoted 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_driverto the function .init.text:depca_isa_probe() The variabledepca_isa_driverreferences
the function__initdepca_isa_probe()
If the reference is valid then annotate the
variable with __init* or__refdata(seelinux/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)
Signed-off-by Sedat Dilek <[email protected]>Again, mark
depca_isa_probe()as__devinitto fix this bug.
Thanks for the pointer, I have sent a new fixed version.
- Sedat -