Skip to contentSkip to conversation

sis190_pci_tbl causes a section type conflict

PATCH Peter Teoh 1 participant 1 message Feb 4, 2008 Networking

lore
Share & tools
lore

Peter Teoh

author
#0 lore raw

While compiling the latest linus tree I got the following error:

rivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type conflict make[2]: *** [drivers/net/sis190.o] Error 1

And after some modification and successful compilation, the following warnings appeared:

WARNING: drivers/net/sis190.o(.text+0xdc): Section mismatch in reference from the function sis190_get_mac_addr() to the function .devinit.text:sis190_get_mac_addr_from_apc()
The function sis190_get_mac_addr() references
the function __devinit sis190_get_mac_addr_from_apc().
This is often because sis190_get_mac_addr lacks a __devinit annotation or the annotation of sis190_get_mac_addr_from_apc is wrong.

WARNING: drivers/net/sis190.o(.text+0xe7): Section mismatch in reference from the function sis190_get_mac_addr() to the function .devinit.text:sis190_get_mac_addr_from_eeprom()
The function sis190_get_mac_addr() references
the function __devinit sis190_get_mac_addr_from_eeprom(). This is often because sis190_get_mac_addr lacks a __devinit annotation or the annotation of sis190_get_mac_addr_from_eeprom is wrong.

The following patch is to fix the above problems - please comment:

net/sis190.c 2008-02-04 08:20:29.000000000 +0800 renamed from sis190.c.orig 2008-02-04 08:17:28.000000000 +0800 +2 -2
@@ -326,7 +326,7 @@ static const struct {
        { "SiS 191 PCI Gigabit Ethernet adapter" },
 };
 
-static struct pci_device_id sis190_pci_tbl[] __devinitdata = {
+static struct pci_device_id sis190_pci_tbl[] = {
        { PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0190), 0, 0, 0 },
        { PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0191), 0, 0, 1 },
        { 0, },
@@ -1630,7 +1630,7 @@ static inline void sis190_init_rxfilter(
        SIS_PCI_COMMIT();
 }
 
-static int sis190_get_mac_addr(struct pci_dev *pdev, struct net_device *dev)
+static int __devinit sis190_get_mac_addr(struct pci_dev *pdev, struct

net_device *dev)

 {
        u8 from;