On Fri, 10 Sep 2010 23:57:05 -0600 Jean Sacren wrote: > WARNING: drivers/eisa/built-in.o(.data+0xb0): Section mismatch in > reference from the variable pci_eisa_driver to the function > .init.text:pci_eisa_init() > > Fix the above warning by correctly declaring pci_eisa_driver variable. > > Signed-off-by: Jean Sacren <sakiwit@xxxxxxxxx> > --- > drivers/eisa/pci_eisa.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/eisa/pci_eisa.c b/drivers/eisa/pci_eisa.c > index 0dd0f63..0beed9b 100644 > --- a/drivers/eisa/pci_eisa.c > +++ b/drivers/eisa/pci_eisa.c > @@ -51,7 +51,7 @@ static struct pci_device_id pci_eisa_pci_tbl[] = { > { 0, } > }; > > -static struct pci_driver pci_eisa_driver = { > +static struct pci_driver pci_eisa_driver __initdata = { > .name = "pci_eisa", > .id_table = pci_eisa_pci_tbl, > .probe = pci_eisa_init, > -- so now pci_eisa_driver is in the __initdata section but pci_eisa_pci_tbl is not, it's in the regular data section. Is that OK? (other than the build system not complaining about it) The full build warning message is: WARNING: drivers/built-in.o(.data+0x4cc0): Section mismatch in reference from the variable pci_eisa_driver to the function .init.text:pci_eisa_init() The variable pci_eisa_driver references the function __init pci_eisa_init() 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, I searched all of drivers/ and did not find any other drivers that mark their struct pci_driver with __initdata. I think that it's probably better to use __refdata instead of __initdata here. Using __refdata certainly kills the build warning for me. --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html