* [PATCH] serial: silence section mismatch warnings in 8250_pci
@ 2008-02-01 20:01 Sam Ravnborg
2008-02-01 20:01 ` [PATCH] rtc: silence section mismatch warning in rtc-test Sam Ravnborg
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Sam Ravnborg @ 2008-02-01 20:01 UTC (permalink / raw)
To: LKML, Andrew Morton; +Cc: Sam Ravnborg, Russell King, linux-serial
Fix following warnings:
WARNING: drivers/serial/built-in.o(.data+0x5b8): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_ite887x_exit()
WARNING: drivers/serial/built-in.o(.data+0x5e0): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
WARNING: drivers/serial/built-in.o(.data+0x608): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
WARNING: drivers/serial/built-in.o(.data+0x658): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
WARNING: drivers/serial/built-in.o(.data+0x680): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
WARNING: drivers/serial/built-in.o(.data+0x6a8): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
WARNING: drivers/serial/built-in.o(.data+0x6d0): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:sbs_exit()
WARNING: drivers/serial/built-in.o(.data+0x6f8): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:sbs_exit()
WARNING: drivers/serial/built-in.o(.data+0x720): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:sbs_exit()
WARNING: drivers/serial/built-in.o(.data+0x748): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:sbs_exit()
pci_serial_quirks contains a number of function pointers
where the referenced function is annotated __devexit.
This is OK so we annotate pci_serial_quirks with
__refdata to ignore the __devexit references
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: linux-serial@vger.kernel.org
---
drivers/serial/8250_pci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index ceb03c9..d6c99c0 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -750,7 +750,7 @@ pci_default_setup(struct serial_private *priv, struct pciserial_board *board,
* This list is ordered alphabetically by vendor then device.
* Specific entries must come before more generic entries.
*/
-static struct pci_serial_quirk pci_serial_quirks[] = {
+static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
/*
* AFAVLAB cards - these may be called via parport_serial
* It is not clear whether this applies to all products.
--
1.5.4.rc3.14.g44397
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] rtc: silence section mismatch warning in rtc-test
2008-02-01 20:01 [PATCH] serial: silence section mismatch warnings in 8250_pci Sam Ravnborg
@ 2008-02-01 20:01 ` Sam Ravnborg
2008-02-01 20:01 ` [PATCH] pcmcia: silence section mismatch warnings from class_interface variables Sam Ravnborg
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2008-02-01 20:01 UTC (permalink / raw)
To: LKML, Andrew Morton; +Cc: Sam Ravnborg, Alessandro Zummo
Fix following warning:
WARNING: vmlinux.o(.data+0x253e28): Section mismatch in reference from the variable test_drv to the function .devexit.text:test_remove()
Fix by renaming the platfrom_driver variable from *_drv to *_driver
so modpost ignore the reference to an __devexit section.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
---
drivers/rtc/rtc-test.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c
index 254c9fc..bc93002 100644
--- a/drivers/rtc/rtc-test.c
+++ b/drivers/rtc/rtc-test.c
@@ -147,7 +147,7 @@ static int __devexit test_remove(struct platform_device *plat_dev)
return 0;
}
-static struct platform_driver test_drv = {
+static struct platform_driver test_driver = {
.probe = test_probe,
.remove = __devexit_p(test_remove),
.driver = {
@@ -160,7 +160,7 @@ static int __init test_init(void)
{
int err;
- if ((err = platform_driver_register(&test_drv)))
+ if ((err = platform_driver_register(&test_driver)))
return err;
if ((test0 = platform_device_alloc("rtc-test", 0)) == NULL) {
@@ -191,7 +191,7 @@ exit_free_test0:
platform_device_put(test0);
exit_driver_unregister:
- platform_driver_unregister(&test_drv);
+ platform_driver_unregister(&test_driver);
return err;
}
@@ -199,7 +199,7 @@ static void __exit test_exit(void)
{
platform_device_unregister(test0);
platform_device_unregister(test1);
- platform_driver_unregister(&test_drv);
+ platform_driver_unregister(&test_driver);
}
MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
--
1.5.4.rc3.14.g44397
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] pcmcia: silence section mismatch warnings from class_interface variables
2008-02-01 20:01 [PATCH] serial: silence section mismatch warnings in 8250_pci Sam Ravnborg
2008-02-01 20:01 ` [PATCH] rtc: silence section mismatch warning in rtc-test Sam Ravnborg
@ 2008-02-01 20:01 ` Sam Ravnborg
2008-02-01 20:01 ` [PATCH] pcmcia: silence section mismatch warnings from pci_driver variables Sam Ravnborg
2008-02-01 20:19 ` [PATCH] serial: silence section mismatch warnings in 8250_pci Sam Ravnborg
3 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2008-02-01 20:01 UTC (permalink / raw)
To: LKML, Andrew Morton; +Cc: Sam Ravnborg, Dominik Brodowski
Silence the following warnings:
WARNING: drivers/pcmcia/built-in.o(.data+0x348): Section mismatch in reference from the variable pccard_sysfs_interface to the function .devinit.text:pccard_sysfs_add_socket()
WARNING: drivers/pcmcia/built-in.o(.data+0x350): Section mismatch in reference from the variable pccard_sysfs_interface to the function .devexit.text:pccard_sysfs_remove_socket()
WARNING: drivers/pcmcia/built-in.o(.data+0x6e8): Section mismatch in reference from the variable pcmcia_bus_interface to the function .devinit.text:pcmcia_bus_add_socket()
WARNING: drivers/pcmcia/built-in.o(.data+0xa88): Section mismatch in reference from the variable pccard_rsrc_interface to the function .devinit.text:pccard_sysfs_add_rsrc()
WARNING: drivers/pcmcia/built-in.o(.data+0xa90): Section mismatch in reference from the variable pccard_rsrc_interface to the function .devexit.text:pccard_sysfs_remove_rsrc()
The variables of type class_interface contains references
to __devinit and __devexit functions which is OK.
Silence warnings by annotating the variables with __refdata.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
---
drivers/pcmcia/ds.c | 2 +-
drivers/pcmcia/rsrc_nonstatic.c | 2 +-
drivers/pcmcia/socket_sysfs.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 15c18f5..7426139 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -1517,7 +1517,7 @@ static void pcmcia_bus_remove_socket(struct device *dev,
/* the pcmcia_bus_interface is used to handle pcmcia socket devices */
-static struct class_interface pcmcia_bus_interface = {
+static struct class_interface pcmcia_bus_interface __refdata = {
.class = &pcmcia_socket_class,
.add_dev = &pcmcia_bus_add_socket,
.remove_dev = &pcmcia_bus_remove_socket,
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index bfcaad6..66a52e0 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -1044,7 +1044,7 @@ static void __devexit pccard_sysfs_remove_rsrc(struct device *dev,
device_remove_file(dev, *attr);
}
-static struct class_interface pccard_rsrc_interface = {
+static struct class_interface pccard_rsrc_interface __refdata = {
.class = &pcmcia_socket_class,
.add_dev = &pccard_sysfs_add_rsrc,
.remove_dev = __devexit_p(&pccard_sysfs_remove_rsrc),
diff --git a/drivers/pcmcia/socket_sysfs.c b/drivers/pcmcia/socket_sysfs.c
index b440900..4677286 100644
--- a/drivers/pcmcia/socket_sysfs.c
+++ b/drivers/pcmcia/socket_sysfs.c
@@ -403,7 +403,7 @@ static void __devexit pccard_sysfs_remove_socket(struct device *dev,
device_remove_file(dev, *attr);
}
-struct class_interface pccard_sysfs_interface = {
+struct class_interface pccard_sysfs_interface __refdata = {
.class = &pcmcia_socket_class,
.add_dev = &pccard_sysfs_add_socket,
.remove_dev = __devexit_p(&pccard_sysfs_remove_socket),
--
1.5.4.rc3.14.g44397
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] pcmcia: silence section mismatch warnings from pci_driver variables
2008-02-01 20:01 [PATCH] serial: silence section mismatch warnings in 8250_pci Sam Ravnborg
2008-02-01 20:01 ` [PATCH] rtc: silence section mismatch warning in rtc-test Sam Ravnborg
2008-02-01 20:01 ` [PATCH] pcmcia: silence section mismatch warnings from class_interface variables Sam Ravnborg
@ 2008-02-01 20:01 ` Sam Ravnborg
2008-02-01 20:19 ` [PATCH] serial: silence section mismatch warnings in 8250_pci Sam Ravnborg
3 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2008-02-01 20:01 UTC (permalink / raw)
To: LKML, Andrew Morton; +Cc: Sam Ravnborg, Dominik Brodowski
Silence following warnings:
WARNING: drivers/pcmcia/built-in.o(.data+0x14e0): Section mismatch in reference from the variable pd6729_pci_drv to the function .devinit.text:pd6729_pci_probe()
WARNING: drivers/pcmcia/built-in.o(.data+0x14e8): Section mismatch in reference from the variable pd6729_pci_drv to the function .devexit.text:pd6729_pci_remove()
WARNING: drivers/pcmcia/built-in.o(.data+0x16c0): Section mismatch in reference from the variable i82092aa_pci_drv to the function .devinit.text:i82092aa_pci_probe()
WARNING: drivers/pcmcia/built-in.o(.data+0x16c8): Section mismatch in reference from the variable i82092aa_pci_drv to the function .devexit.text:i82092aa_pci_remove()
Rename the variables from *_drv to *_driver so
modpost ignore the OK references to __devinit/__devexit
functions.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
---
drivers/pcmcia/i82092.c | 6 +++---
drivers/pcmcia/pd6729.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c
index df21e2d..1fae0bd 100644
--- a/drivers/pcmcia/i82092.c
+++ b/drivers/pcmcia/i82092.c
@@ -53,7 +53,7 @@ static int i82092aa_socket_resume (struct pci_dev *dev)
}
#endif
-static struct pci_driver i82092aa_pci_drv = {
+static struct pci_driver i82092aa_pci_driver = {
.name = "i82092aa",
.id_table = i82092aa_pci_ids,
.probe = i82092aa_pci_probe,
@@ -709,13 +709,13 @@ static int i82092aa_set_mem_map(struct pcmcia_socket *socket, struct pccard_mem_
static int i82092aa_module_init(void)
{
- return pci_register_driver(&i82092aa_pci_drv);
+ return pci_register_driver(&i82092aa_pci_driver);
}
static void i82092aa_module_exit(void)
{
enter("i82092aa_module_exit");
- pci_unregister_driver(&i82092aa_pci_drv);
+ pci_unregister_driver(&i82092aa_pci_driver);
if (sockets[0].io_base>0)
release_region(sockets[0].io_base, 2);
leave("i82092aa_module_exit");
diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c
index abc10fe..8bed1da 100644
--- a/drivers/pcmcia/pd6729.c
+++ b/drivers/pcmcia/pd6729.c
@@ -778,7 +778,7 @@ static struct pci_device_id pd6729_pci_ids[] = {
};
MODULE_DEVICE_TABLE(pci, pd6729_pci_ids);
-static struct pci_driver pd6729_pci_drv = {
+static struct pci_driver pd6729_pci_driver = {
.name = "pd6729",
.id_table = pd6729_pci_ids,
.probe = pd6729_pci_probe,
@@ -791,12 +791,12 @@ static struct pci_driver pd6729_pci_drv = {
static int pd6729_module_init(void)
{
- return pci_register_driver(&pd6729_pci_drv);
+ return pci_register_driver(&pd6729_pci_driver);
}
static void pd6729_module_exit(void)
{
- pci_unregister_driver(&pd6729_pci_drv);
+ pci_unregister_driver(&pd6729_pci_driver);
}
module_init(pd6729_module_init);
--
1.5.4.rc3.14.g44397
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] serial: silence section mismatch warnings in 8250_pci
2008-02-01 20:01 [PATCH] serial: silence section mismatch warnings in 8250_pci Sam Ravnborg
` (2 preceding siblings ...)
2008-02-01 20:01 ` [PATCH] pcmcia: silence section mismatch warnings from pci_driver variables Sam Ravnborg
@ 2008-02-01 20:19 ` Sam Ravnborg
3 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2008-02-01 20:19 UTC (permalink / raw)
To: LKML, Andrew Morton
Hi Andrew.
Again I rely on you to pick up the patches.
But let me know if you prefer another route toward mainline.
And I obviously expect the Cc: people to review the changes
albeit this serie is trivial.
This is on top of my local tree and not -mm - so yell at me
and drop anything that does not apply.
Sam
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-02-01 20:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-01 20:01 [PATCH] serial: silence section mismatch warnings in 8250_pci Sam Ravnborg
2008-02-01 20:01 ` [PATCH] rtc: silence section mismatch warning in rtc-test Sam Ravnborg
2008-02-01 20:01 ` [PATCH] pcmcia: silence section mismatch warnings from class_interface variables Sam Ravnborg
2008-02-01 20:01 ` [PATCH] pcmcia: silence section mismatch warnings from pci_driver variables Sam Ravnborg
2008-02-01 20:19 ` [PATCH] serial: silence section mismatch warnings in 8250_pci Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).