RFC: Possible section mismatch problem in ibm_newemac?
I am using a recent DENX git tree. I want to enable debugging in prom_parse.c. When I do that, I see link warnings like:
WARNING: drivers/net/ibm_newemac/ibm_newemac.o(.data+0x6e0): Section mismatch in reference from the variable emac_of_bus_notifier to the function .devinit.text:emac_of_bus_notify() The variable emac_of_bus_notifier references
the function __devinit emac_of_bus_notify()
WARNING: drivers/net/ibm_newemac/built-in.o(.devinit.text+0x14d4): Section mismatch in reference from the function emac_probe() to the function .devexit.text:rgmii_detach() The function __devinit emac_probe() references
a function __devexit rgmii_detach().
I've made the following changes, which clean up the link warnings, but I'm not sure this is the right way to fix the problem. If it is correct, I'd like to submit the patch.
---
drivers/net/ibm_newemac/core.c +1 -1
@@ -2241,7 +2241,7 @@ static int __devinit emac_of_bus_notify(struct notifier_block *nb,return 0 ; } -static struct notifier_block emac_of_bus_notifier = { +static struct notifier_block __devinitdata emac_of_bus_notifier = { .notifier_call = emac_of_bus_notify };
drivers/net/ibm_newemac/mal.c +1 -1
@@ -61,7 +61,7 @@ int __devinit mal_register_commac(struct mal_instance *mal,return 0 ; } -void __devexit mal_unregister_commac(struct mal_instance *mal, +void mal_unregister_commac (struct mal_instance *mal,struct mal_commac *commac) {unsigned long flags;
drivers/net/ibm_newemac/rgmii.c +1 -1
@@ -179,7 +179,7 @@ void rgmii_put_mdio(struct of_device *ofdev, int input)mutex_unlock (&dev->lock); } -void __devexit rgmii_detach(struct of_device *ofdev, int input) +void rgmii_detach (struct of_device *ofdev,int input) {struct rgmii_instance *dev =dev_get_drvdata (&ofdev->dev);struct rgmii_regs __iomem *p = dev->base;
drivers/net/ibm_newemac/zmii.c +1 -1
@@ -189,7 +189,7 @@ void zmii_set_speed(struct of_device *ofdev, int input, int speed)mutex_unlock (&dev->lock); } -void __devexit zmii_detach(struct of_device *ofdev, int input) +void zmii_detach (struct of_device *ofdev,int input) {struct zmii_instance *dev =dev_get_drvdata (&ofdev->dev);
Quoted 2 lines · On Mon, 21 Apr 2008 12:02:25 -0400 "Steven A. Falco" <[email protected]> wrote:
I am using a recent DENX git tree. I want to enable debugging in
prom_parse.c. When I do that, I see link warnings like:
I already sent a patch a month and a half ago to clean all these warnings up. It never got pushed upstream.
josh