Stelian Pop | 5 May 12:26
Favicon
Gravatar

[PATCH, 2.6.17-rc3-currentgit] jffs2: fix __init usage

Hi,

Compiling jffs2 as a module gives: 
	WARNING: fs/jffs2/jffs2.o - Section mismatch: reference to
	.init.text:jffs2_zlib_init from .text between 
	'jffs2_compressors_init' (at offset 0xa0) and 'jffs2_compressors_exit'

The attached patch fixes that by adding the correct __init tags to
jffs2_compressors_init() and each compressor initialisation functions.

Signed-off-by: Stelian Pop <stelian <at> popies.net>

---

 compr.c       |    2 +-
 compr_rtime.c |    2 +-
 compr_rubin.c |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff -r 8d66b80a7a7c fs/jffs2/compr.c
--- a/fs/jffs2/compr.c	Fri May  5 10:50:10 2006 +0200
+++ b/fs/jffs2/compr.c	Fri May  5 11:17:03 2006 +0200
@@ -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 */
(Continue reading)

David Brownell | 16 May 16:55

Re: jffs2 build fixes

On Saturday 01 April 2006 8:31 am, David Brownell wrote:
> against today's GIT; there's a section error and
> several printk format warnings.  x86_64.

I see that Andrew also got tired of such printk warnings, so his
fix is now in the kernel.org tree ... here's a resend of this
patch, updated against today's GIT by removing two of the printk
warning fixes.

- Dave

Attachment (build.patch): text/x-diff, 2768 bytes
Jörn Engel | 16 May 17:09
Picon

Re: jffs2 build fixes

On Tue, 16 May 2006 07:55:37 -0700, David Brownell wrote:
> On Saturday 01 April 2006 8:31 am, David Brownell wrote:
> > against today's GIT; there's a section error and
> > several printk format warnings.  x86_64.
> 
> I see that Andrew also got tired of such printk warnings, so his
> fix is now in the kernel.org tree ... here's a resend of this
> patch, updated against today's GIT by removing two of the printk
> warning fixes.

jffs-dev <at> axis.com is practically dead.  Iirc, the list was used for
the old jffs[1] code.  Jffs2 is usually discussed on
linux-mtd <at> lists.infradead.org (added to Cc:).

> Resolve some JFFS2 build problems:
>   (a) section mismatch error
>   (b) wrong printk format warnings
> 
> The section mismatch issue was fixed by making a few more routines as
> belonging in init or exit sections, but there are more routines that
> could (should!) get such annotations.

Patch looks sane.  Does it still apply against dwmw2's latest tree?
http://git.infradead.org/?p=mtd-2.6.git

[ Patch kept for the benefit of linux-mtd ]

> Signed-off-by: David Brownell <dbrownell <at> users.sourceforge.net>
> 
> Index: g26/fs/jffs2/compr.c
(Continue reading)

David Woodhouse | 16 May 17:08
Favicon

Re: jffs2 build fixes

On Tue, 2006-05-16 at 07:55 -0700, David Brownell wrote:
> I see that Andrew also got tired of such printk warnings, so his
> fix is now in the kernel.org tree ... here's a resend of this
> patch, updated against today's GIT by removing two of the printk
> warning fixes.

The other three printk watning fixes don't seem to apply any more
either. I've committed the __init and __exit bits though. Thanks.

--

-- 
dwmw2

David Brownell | 16 May 17:25

Re: jffs2 build fixes

On Tuesday 16 May 2006 8:09 am, Jörn Engel wrote:

> jffs-dev <at> axis.com is practically dead.  Iirc, the list was used for
> the old jffs[1] code.  Jffs2 is usually discussed on
> linux-mtd <at> lists.infradead.org (added to Cc:).

Then it's overdue for the MAINTAINERS file to be updated ... it
seems wrong that the official "where to go" listing for JFFS2
points at a black hole.

David Woodhouse | 16 May 17:34
Favicon

Re: jffs2 build fixes

On Tue, 2006-05-16 at 17:33 +0200, Jörn Engel wrote:
> Ouch!  Yes, you are correct.
> 
> Can you send a patch to dwmw2? 

dwmw2 is still subscribed to jffs-dev and responds... when the
moderators eventually approve non-subscriber posts, at least :)

Changing it to linux-mtd <at> lists.infradead.org would seem to make sense
though.

--

-- 
dwmw2

Jörn Engel | 16 May 17:33
Picon

Re: jffs2 build fixes

On Tue, 16 May 2006 08:25:52 -0700, David Brownell wrote:
> On Tuesday 16 May 2006 8:09 am, Jörn Engel wrote:
> 
> > jffs-dev <at> axis.com is practically dead.  Iirc, the list was used for
> > the old jffs[1] code.  Jffs2 is usually discussed on
> > linux-mtd <at> lists.infradead.org (added to Cc:).
> 
> Then it's overdue for the MAINTAINERS file to be updated ... it
> seems wrong that the official "where to go" listing for JFFS2
> points at a black hole.

Ouch!  Yes, you are correct.

Can you send a patch to dwmw2?

Jörn

--

-- 
Write programs that do one thing and do it well. Write programs to work
together. Write programs to handle text streams, because that is a
universal interface. 
-- Doug MacIlroy

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

David Brownell | 25 May 06:02

Re: jffs2 build fixes

On Tuesday 16 May 2006 8:08 am, David Woodhouse wrote:
> On Tue, 2006-05-16 at 07:55 -0700, David Brownell wrote:
> > I see that Andrew also got tired of such printk warnings, so his
> > fix is now in the kernel.org tree ... here's a resend of this
> > patch, updated against today's GIT by removing two of the printk
> > warning fixes.
> 
> The other three printk watning fixes don't seem to apply any more
> either. I've committed the __init and __exit bits though. Thanks.

I'm getting section warnings with RC5 building JFFS2 as an x86 module;
the ZLIB compressors it seems.

You might want to push those __init and __exit bits soon ...

- Dave

Gmane