* [PATCH] IOATDMA: fix section mismatches
@ 2007-06-25 21:51 Randy Dunlap
2007-06-26 4:34 ` Sam Ravnborg
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2007-06-25 21:51 UTC (permalink / raw)
To: lkml; +Cc: christopher.leech, sam, akpm
From: Randy Dunlap <randy.dunlap@oracle.com>
Rename struct pci_driver data so that false section mismatch
warnings won't be produced.
Sam, ISTM that depending on variable names is the weakest & worst part of
modpost section checking. Should __init_refok work here? I got build
errors when I tried to use it, probably because the struct pci_driver
probe and remove methods are not marked "__init_refok".
WARNING: drivers/dma/ioatdma.o(.data+0x10): Section mismatch: reference to .init.text: (between 'ioat_pci_drv' and 'ioat_pci_tbl')
WARNING: drivers/dma/ioatdma.o(.data+0x14): Section mismatch: reference to .exit.text: (between 'ioat_pci_drv' and 'ioat_pci_tbl')
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
drivers/dma/ioatdma.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- linux-2.6.22-rc6.orig/drivers/dma/ioatdma.c
+++ linux-2.6.22-rc6/drivers/dma/ioatdma.c
@@ -556,7 +556,7 @@ static struct pci_device_id ioat_pci_tbl
{ 0, }
};
-static struct pci_driver ioat_pci_drv = {
+static struct pci_driver ioat_pci_driver = {
.name = "ioatdma",
.id_table = ioat_pci_tbl,
.probe = ioat_probe,
@@ -699,7 +699,7 @@ static int __devinit ioat_probe(struct p
if (err)
goto err_set_dma_mask;
- err = pci_request_regions(pdev, ioat_pci_drv.name);
+ err = pci_request_regions(pdev, ioat_pci_driver.name);
if (err)
goto err_request_regions;
@@ -828,14 +828,14 @@ static int __init ioat_init_module(void)
/* if forced, worst case is that rmmod hangs */
__unsafe(THIS_MODULE);
- return pci_register_driver(&ioat_pci_drv);
+ return pci_register_driver(&ioat_pci_driver);
}
module_init(ioat_init_module);
static void __exit ioat_exit_module(void)
{
- pci_unregister_driver(&ioat_pci_drv);
+ pci_unregister_driver(&ioat_pci_driver);
}
module_exit(ioat_exit_module);
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] IOATDMA: fix section mismatches
2007-06-25 21:51 [PATCH] IOATDMA: fix section mismatches Randy Dunlap
@ 2007-06-26 4:34 ` Sam Ravnborg
0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2007-06-26 4:34 UTC (permalink / raw)
To: Randy Dunlap; +Cc: lkml, christopher.leech, akpm
On Mon, Jun 25, 2007 at 02:51:47PM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Rename struct pci_driver data so that false section mismatch
> warnings won't be produced.
>
> Sam, ISTM that depending on variable names is the weakest & worst part of
> modpost section checking. Should __init_refok work here? I got build
> errors when I tried to use it, probably because the struct pci_driver
> probe and remove methods are not marked "__init_refok".
Relying on naming is obviously a bad thing but without doing so
we would have tons of warnings from drivers/
__init_refok is for functions. For this case __initdata_refok
could have worked but to be consistent the renaming is much
better.
Sam
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-26 4:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-25 21:51 [PATCH] IOATDMA: fix section mismatches Randy Dunlap
2007-06-26 4:34 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox