* [PATCH 4/4] fix sparc32 modpost warnings
@ 2006-10-10 15:46 Martin Habets
2006-10-10 21:44 ` David Miller
2006-10-11 12:22 ` Martin Habets
0 siblings, 2 replies; 3+ messages in thread
From: Martin Habets @ 2006-10-10 15:46 UTC (permalink / raw)
To: sparclinux
Fix this 2.6.19-rc1 build warnings from modpost:
WARNING: vmlinux - Section mismatch: reference to .init.text:sunzilog_console_setup from .data between 'sunzilog_console' (at offset 0x8394) and 'devices_subsys'
Martin
Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
---
Index: linux/drivers/serial/sunzilog.c
=================================--- linux.orig/drivers/serial/sunzilog.c 2006-10-06 00:33:43.000000000 +0100
+++ linux/drivers/serial/sunzilog.c 2006-10-07 03:48:41.000000000 +0100
@@ -1190,7 +1190,7 @@
return 0;
}
-static struct console sunzilog_console = {
+static struct console sunzilog_console_ops = {
.name = "ttyS",
.write = sunzilog_console_write,
.device = uart_console_device,
@@ -1216,10 +1216,10 @@
if (i = NUM_CHANNELS)
return NULL;
- sunzilog_console.index = i;
+ sunzilog_console_ops.index = i;
sunzilog_port_table[i].flags |= SUNZILOG_FLAG_IS_CONS;
- return &sunzilog_console;
+ return &sunzilog_console_ops;
}
#else
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 4/4] fix sparc32 modpost warnings
2006-10-10 15:46 [PATCH 4/4] fix sparc32 modpost warnings Martin Habets
@ 2006-10-10 21:44 ` David Miller
2006-10-11 12:22 ` Martin Habets
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2006-10-10 21:44 UTC (permalink / raw)
To: sparclinux
From: Martin Habets <errandir_news@mph.eclipse.co.uk>
Date: Tue, 10 Oct 2006 16:46:35 +0100
> Fix this 2.6.19-rc1 build warnings from modpost:
>
> WARNING: vmlinux - Section mismatch: reference to .init.text:sunzilog_console_setup from .data between 'sunzilog_console' (at offset 0x8394) and 'devices_subsys'
>
>Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
...
> -static struct console sunzilog_console = {
> +static struct console sunzilog_console_ops = {
I'll apply this, but why does simply changing the symbol
name make the section conflict go away?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 4/4] fix sparc32 modpost warnings
2006-10-10 15:46 [PATCH 4/4] fix sparc32 modpost warnings Martin Habets
2006-10-10 21:44 ` David Miller
@ 2006-10-11 12:22 ` Martin Habets
1 sibling, 0 replies; 3+ messages in thread
From: Martin Habets @ 2006-10-11 12:22 UTC (permalink / raw)
To: sparclinux
On Tue, Oct 10, 2006 at 02:44:48PM -0700, David Miller wrote:
> From: Martin Habets <errandir_news@mph.eclipse.co.uk>
> Date: Tue, 10 Oct 2006 16:46:35 +0100
>
> > Fix this 2.6.19-rc1 build warnings from modpost:
> >
> > WARNING: vmlinux - Section mismatch: reference to .init.text:sunzilog_console_setup from .data between 'sunzilog_console' (at offset 0x8394) and 'devices_subsys'
> >
> >Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
> ...
> > -static struct console sunzilog_console = {
> > +static struct console sunzilog_console_ops = {
>
> I'll apply this, but why does simply changing the symbol
> name make the section conflict go away?
Ok, I'll be more verbose in future. This patch works because modpost
has a couple of patterns built-in that it ignores. I could have picked
any pattern listed below, but felt _ops was the most apropriate one
here.
From the comments for secref_whitelist():
* Pattern 2:
* Many drivers utilise a *driver container with references to
* add, remove, probe functions etc.
* These functions may often be marked __init and we do not want to
* warn here.
* the pattern is identified by:
* tosec = .init.text | .exit.text | .init.data
* fromsec = .data
* atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one
More on the other patches later.
Thanks,
--
Martin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-10-11 12:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-10 15:46 [PATCH 4/4] fix sparc32 modpost warnings Martin Habets
2006-10-10 21:44 ` David Miller
2006-10-11 12:22 ` Martin Habets
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.