Skip to content

Commit

Permalink
can: pch_can: fix section mismatch warning by using a whitelisted name
Browse files Browse the repository at this point in the history
This patch fixes the following section mismatch warning:

WARNING: drivers/net/can/pch_can.o(.data+0x18):
Section mismatch in reference from the variable pch_can_pcidev
to the variable .devinit.rodata:pch_pci_tbl
The variable pch_can_pcidev references
the variable __devinitconst pch_pci_tbl

This is actually a false positive which is fixed by giving the offending
variable a whitelisted name, it's renamed to "pch_can_pci_driver".
This makes sense because the variable is of the type "struct pci_driver".

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Marc Kleine-Budde authored and David S. Miller committed Oct 30, 2010
1 parent 526de53 commit bdfa3d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/can/pch_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ static int __devinit pch_can_probe(struct pci_dev *pdev,
return rc;
}

static struct pci_driver pch_can_pcidev = {
static struct pci_driver pch_can_pci_driver = {
.name = "pch_can",
.id_table = pch_pci_tbl,
.probe = pch_can_probe,
Expand All @@ -1448,13 +1448,13 @@ static struct pci_driver pch_can_pcidev = {

static int __init pch_can_pci_init(void)
{
return pci_register_driver(&pch_can_pcidev);
return pci_register_driver(&pch_can_pci_driver);
}
module_init(pch_can_pci_init);

static void __exit pch_can_pci_exit(void)
{
pci_unregister_driver(&pch_can_pcidev);
pci_unregister_driver(&pch_can_pci_driver);
}
module_exit(pch_can_pci_exit);

Expand Down

0 comments on commit bdfa3d8

Please sign in to comment.