* [PATCH] jffs2: fix section mismatches
@ 2006-06-10 20:28 Randy.Dunlap
2006-06-10 22:00 ` David Woodhouse
0 siblings, 1 reply; 5+ messages in thread
From: Randy.Dunlap @ 2006-06-10 20:28 UTC (permalink / raw)
To: lkml; +Cc: dwmw2, akpm
From: Randy Dunlap <rdunlap@xenotime.net>
Priority: not critical; makes init code discardable.
Fix section mismatch warnings:
WARNING: fs/jffs2/jffs2.o - Section mismatch: reference to .init.text:jffs2_zlib_init from .text between 'jffs2_compressors_init' (at offset 0x546) and 'jffs2_compressors_exit'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
fs/jffs2/compr.c | 2 +-
fs/jffs2/compr_rtime.c | 2 +-
fs/jffs2/compr_rubin.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
--- linux-2617-rc6.orig/fs/jffs2/compr.c
+++ linux-2617-rc6/fs/jffs2/compr.c
@@ -412,7 +412,7 @@ void jffs2_free_comprbuf(unsigned char *
kfree(comprbuf);
}
-int jffs2_compressors_init(void)
+int __init jffs2_compressors_init(void)
{
/* Registering compressors */
#ifdef CONFIG_JFFS2_ZLIB
--- linux-2617-rc6.orig/fs/jffs2/compr_rtime.c
+++ linux-2617-rc6/fs/jffs2/compr_rtime.c
@@ -121,7 +121,7 @@ static struct jffs2_compressor jffs2_rti
#endif
};
-int jffs2_rtime_init(void)
+int __init jffs2_rtime_init(void)
{
return jffs2_register_compressor(&jffs2_rtime_comp);
}
--- linux-2617-rc6.orig/fs/jffs2/compr_rubin.c
+++ linux-2617-rc6/fs/jffs2/compr_rubin.c
@@ -344,7 +344,7 @@ static struct jffs2_compressor jffs2_rub
#endif
};
-int jffs2_rubinmips_init(void)
+int __init jffs2_rubinmips_init(void)
{
return jffs2_register_compressor(&jffs2_rubinmips_comp);
}
@@ -367,7 +367,7 @@ static struct jffs2_compressor jffs2_dyn
#endif
};
-int jffs2_dynrubin_init(void)
+int __init jffs2_dynrubin_init(void)
{
return jffs2_register_compressor(&jffs2_dynrubin_comp);
}
---
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] jffs2: fix section mismatches
2006-06-10 20:28 [PATCH] jffs2: fix section mismatches Randy.Dunlap
@ 2006-06-10 22:00 ` David Woodhouse
2006-06-10 22:41 ` Sam Ravnborg
2006-06-10 23:29 ` Randy.Dunlap
0 siblings, 2 replies; 5+ messages in thread
From: David Woodhouse @ 2006-06-10 22:00 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: lkml, akpm
On Sat, 2006-06-10 at 13:28 -0700, Randy.Dunlap wrote:
> Priority: not critical; makes init code discardable.
>
> Fix section mismatch warnings:
> WARNING: fs/jffs2/jffs2.o - Section mismatch: reference
> to .init.text:jffs2_zlib_init from .text between
> 'jffs2_compressors_init' (at offset 0x546) and
> 'jffs2_compressors_exit'
Some of this is already in -mm, isn't it?
I'm wary of this kind of change from drive-by patchers now -- I had to
commit two fixes recently to remove __exit from functions which are
actually called in the error case from the init function.
For those exit-and-error functions, I think we actually want an
__initexit marker. In the built-in case, it can actually be discarded
with the init code. In the modular case, it needs to be kept.
--
dwmw2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] jffs2: fix section mismatches
2006-06-10 22:00 ` David Woodhouse
@ 2006-06-10 22:41 ` Sam Ravnborg
2006-06-10 23:29 ` Randy.Dunlap
1 sibling, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2006-06-10 22:41 UTC (permalink / raw)
To: David Woodhouse; +Cc: Randy.Dunlap, lkml, akpm
On Sat, Jun 10, 2006 at 11:00:17PM +0100, David Woodhouse wrote:
> On Sat, 2006-06-10 at 13:28 -0700, Randy.Dunlap wrote:
> > Priority: not critical; makes init code discardable.
> >
> > Fix section mismatch warnings:
> > WARNING: fs/jffs2/jffs2.o - Section mismatch: reference
> > to .init.text:jffs2_zlib_init from .text between
> > 'jffs2_compressors_init' (at offset 0x546) and
> > 'jffs2_compressors_exit'
>
> Some of this is already in -mm, isn't it?
>
> I'm wary of this kind of change from drive-by patchers now -- I had to
> commit two fixes recently to remove __exit from functions which are
> actually called in the error case from the init function.
The check in modpost should have caught these and
flagged them?!?
> For those exit-and-error functions, I think we actually want an
> __initexit marker. In the built-in case, it can actually be discarded
> with the init code. In the modular case, it needs to be kept.
People have troubles enough getting it right today.
Just see the warnings that comes with an allmodconfig build.
So introducing more complexity for a corner case is not a good way
forward.
Sam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] jffs2: fix section mismatches
2006-06-10 22:00 ` David Woodhouse
2006-06-10 22:41 ` Sam Ravnborg
@ 2006-06-10 23:29 ` Randy.Dunlap
2006-06-10 23:32 ` David Woodhouse
1 sibling, 1 reply; 5+ messages in thread
From: Randy.Dunlap @ 2006-06-10 23:29 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-kernel, akpm
On Sat, 10 Jun 2006 23:00:17 +0100 David Woodhouse wrote:
> On Sat, 2006-06-10 at 13:28 -0700, Randy.Dunlap wrote:
> > Priority: not critical; makes init code discardable.
> >
> > Fix section mismatch warnings:
> > WARNING: fs/jffs2/jffs2.o - Section mismatch: reference
> > to .init.text:jffs2_zlib_init from .text between
> > 'jffs2_compressors_init' (at offset 0x546) and
> > 'jffs2_compressors_exit'
>
> Some of this is already in -mm, isn't it?
Ack, one of them is, yes. Sorry I missed it.
> I'm wary of this kind of change from drive-by patchers now -- I had to
> commit two fixes recently to remove __exit from functions which are
> actually called in the error case from the init function.
Surely those would have been caught with the modpost checker,
if the patch submitter(s) used it... ??
FWIW, I check the ones that I submit very carefully, but I too
can make mistakes.
> For those exit-and-error functions, I think we actually want an
> __initexit marker. In the built-in case, it can actually be discarded
> with the init code. In the modular case, it needs to be kept.
That sounds good, yes.
---
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] jffs2: fix section mismatches
2006-06-10 23:29 ` Randy.Dunlap
@ 2006-06-10 23:32 ` David Woodhouse
0 siblings, 0 replies; 5+ messages in thread
From: David Woodhouse @ 2006-06-10 23:32 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: linux-kernel, akpm
On Sat, 2006-06-10 at 16:29 -0700, Randy.Dunlap wrote:
> > For those exit-and-error functions, I think we actually want an
> > __initexit marker. In the built-in case, it can actually be discarded
> > with the init code. In the modular case, it needs to be kept.
>
> That sounds good, yes.
In practice we could just use __init for it, until such time as we
actually start discarding initcode from modules.
--
dwmw2
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-06-10 23:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-10 20:28 [PATCH] jffs2: fix section mismatches Randy.Dunlap
2006-06-10 22:00 ` David Woodhouse
2006-06-10 22:41 ` Sam Ravnborg
2006-06-10 23:29 ` Randy.Dunlap
2006-06-10 23:32 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®