diff mbox

ahci_platform: Remove unneeded ahci_driver.probe assignment

Message ID 20100625122053.GA14391@oksana.dev.rtsoft.ru
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Anton Vorontsov June 25, 2010, 12:20 p.m. UTC
The driver is using platform_driver_probe() during initialization,
so ahci_driver.probe hook is never used.

But it causes the following (harmless, luckily) section mismatch:

  WARNING: vmlinux.o(.data+0x2fb20): Section mismatch in reference
  from the variable ahci_driver to the function .init.text:ahci_probe()

This patch removes the ahci_driver.probe assignment, thus fixes
the warning.

p.s. Note that there's another patch[1] from Rene Bolldorf that
tried to solve the same issue by __refdata annotation. __refdata
says that this reference is actually OK, but in fact it is not OK,
because dereferencing .probe() will cause problems. So the proper
fix is to remove the assignment.

[1] http://kerneltrap.org/mailarchive/linux-kernel/2010/3/18/4549547

Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
---
 drivers/ata/ahci_platform.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Jeff Garzik July 1, 2010, 7:30 p.m. UTC | #1
On 06/25/2010 08:20 AM, Anton Vorontsov wrote:
> The driver is using platform_driver_probe() during initialization,
> so ahci_driver.probe hook is never used.
>
> But it causes the following (harmless, luckily) section mismatch:
>
>    WARNING: vmlinux.o(.data+0x2fb20): Section mismatch in reference
>    from the variable ahci_driver to the function .init.text:ahci_probe()
>
> This patch removes the ahci_driver.probe assignment, thus fixes
> the warning.
>
> p.s. Note that there's another patch[1] from Rene Bolldorf that
> tried to solve the same issue by __refdata annotation. __refdata
> says that this reference is actually OK, but in fact it is not OK,
> because dereferencing .probe() will cause problems. So the proper
> fix is to remove the assignment.
>
> [1] http://kerneltrap.org/mailarchive/linux-kernel/2010/3/18/4549547
>
> Signed-off-by: Anton Vorontsov<avorontsov@mvista.com>
> ---
>   drivers/ata/ahci_platform.c |    1 -
>   1 files changed, 0 insertions(+), 1 deletions(-)

applied


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 5e11b16..8070615 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -166,7 +166,6 @@  static int __devexit ahci_remove(struct platform_device *pdev)
 }
 
 static struct platform_driver ahci_driver = {
-	.probe = ahci_probe,
 	.remove = __devexit_p(ahci_remove),
 	.driver = {
 		.name = "ahci",