Patchwork tulip: Fix compiler warning when CONFIG_DEBUG_SECTION_MISMATCH=y

login
register
mail settings
Submitter Christoph Paasch
Date Dec. 6, 2012, 1:04 p.m.
Message ID <1354799067-25680-1-git-send-email-christoph.paasch@uclouvain.be>
Download mbox | patch
Permalink /patch/204224/
State Rejected
Delegated to: David Miller
Headers show

Comments

Christoph Paasch - Dec. 6, 2012, 1:04 p.m.
WARNING: drivers/net/ethernet/dec/tulip/tulip.o(.text+0x4057): Section
mismatch in reference from the function tulip_init_one() to the variable
.devinit.rodata:early_486_chipsets
The function tulip_init_one() references
the variable __devinitconst early_486_chipsets.
This is often because tulip_init_one lacks a __devinitconst
annotation or the annotation of early_486_chipsets is wrong.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
---
 drivers/net/ethernet/dec/tulip/tulip_core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Ben Hutchings - Dec. 6, 2012, 2:20 p.m.
On Thu, 2012-12-06 at 14:04 +0100, Christoph Paasch wrote:
> WARNING: drivers/net/ethernet/dec/tulip/tulip.o(.text+0x4057): Section
> mismatch in reference from the function tulip_init_one() to the variable
> .devinit.rodata:early_486_chipsets
> The function tulip_init_one() references
> the variable __devinitconst early_486_chipsets.
> This is often because tulip_init_one lacks a __devinitconst
> annotation or the annotation of early_486_chipsets is wrong.
> 
> Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
[...]

The section mismatch will be resolved shortly as hotplug is being made
non-optional and all the __devinit and similar section qualifiers will
go away.  There's no need to make local fixes like this now.

Ben.
David Miller - Dec. 6, 2012, 9:35 p.m.
From: Christoph Paasch <christoph.paasch@uclouvain.be>
Date: Thu,  6 Dec 2012 14:04:27 +0100

> WARNING: drivers/net/ethernet/dec/tulip/tulip.o(.text+0x4057): Section
> mismatch in reference from the function tulip_init_one() to the variable
> .devinit.rodata:early_486_chipsets
> The function tulip_init_one() references
> the variable __devinitconst early_486_chipsets.
> This is often because tulip_init_one lacks a __devinitconst
> annotation or the annotation of early_486_chipsets is wrong.
> 
> Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>

Can you at least do the bare minimum amount of research when making
"fixes" like this?

These __devinit removals were done on purpose.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c
index 157c8e6..6baec9c 100644
--- a/drivers/net/ethernet/dec/tulip/tulip_core.c
+++ b/drivers/net/ethernet/dec/tulip/tulip_core.c
@@ -1301,7 +1301,7 @@  DEFINE_PCI_DEVICE_TABLE(early_486_chipsets) = {
 	{ },
 };
 
-static int tulip_init_one(struct pci_dev *pdev,
+static int __devinit tulip_init_one(struct pci_dev *pdev,
 			  const struct pci_device_id *ent)
 {
 	struct tulip_private *tp;
@@ -1970,7 +1970,7 @@  static void poll_tulip (struct net_device *dev)
 }
 #endif
 
-static struct pci_driver tulip_driver = {
+static struct __devinitdata pci_driver tulip_driver = {
 	.name		= DRV_NAME,
 	.id_table	= tulip_pci_tbl,
 	.probe		= tulip_init_one,