All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>,
	rusty@rustcorp.com.au, LKML <linux-kernel@vger.kernel.org>,
	len.brown@intel.com, Paul Bristow <paul@paulbristow.net>,
	mpm@selenic.com, B.Zolnierkiewicz@elka.pw.edu.pl, kkeil@suse.de,
	linux-dvb-maintainer@linuxtv.org, philb@gnu.org, gregkh@suse.de,
	dwmw2@infradead.org
Subject: Re: kbuild: Section mismatch warnings
Date: Sat, 18 Feb 2006 13:34:59 +0000	[thread overview]
Message-ID: <20060218133459.GA14141@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20060218121414.GA5273@mars.ravnborg.org>

On Sat, Feb 18, 2006 at 01:14:14PM +0100, Sam Ravnborg wrote:
> It hits only arrays - so I took a look into moduleparam.h.
> Looks like an __initdata tag is missing?
> 
> diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
> index b5c98c4..e67eafd 100644
> --- a/include/linux/moduleparam.h
> +++ b/include/linux/moduleparam.h
> @@ -147,6 +147,7 @@ extern int param_get_invbool(char *buffe
>  /* Comma-separated array: *nump is set to number they actually specified. */
>  #define module_param_array_named(name, array, type, nump, perm)		\
>  	static struct kparam_array __param_arr_##name			\
> +	__initdata							\
>  	= { ARRAY_SIZE(array), nump, param_set_##type, param_get_##type,\
>  	    sizeof(array[0]), array };					\
>  	module_param_call(name, param_array_set, param_array_get, 	\
> 
> 
> With this change static struct kparam_array __param_arr_##name is placed
> in .init.data.
> This made the warnings in drivers/input/joystick/db9 disappear.
> 
> And with db9 marked __initdata there should be nothing wrong in
> using __initdata for __param_arr_##name as I see it.

What happens to /sys/module/*/parameters/foo if you read/write it?
Probably worth checking to ensure there isn't an oops lurking as a
result of this change.

(Maybe we need to poison the free'd init sections at boot time just
to make sure we catch possible errors like this.)

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2006-02-18 13:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-17 21:48 kbuild: Sam Ravnborg
2006-02-17 22:47 ` kbuild: Section mismatch warnings Sam Ravnborg
2006-02-17 23:32   ` Adrian Bunk
2006-02-17 23:38     ` Sam Ravnborg
2006-02-17 23:56       ` Adrian Bunk
2006-02-18  0:14       ` Nicholas Miell
2006-02-18 21:25         ` Sam Ravnborg
2006-02-18  0:09   ` Greg KH
2006-02-18  0:48     ` David Brownell
2006-02-18  0:57       ` Greg KH
2006-02-18 20:32         ` David Brownell
2006-02-19  0:21     ` Sam Ravnborg
2006-02-22  5:09       ` Greg KH
2006-02-18  0:49   ` Dmitry Torokhov
2006-02-18 12:14     ` Sam Ravnborg
2006-02-18 13:34       ` Russell King [this message]
2006-02-19 11:36   ` Sam Ravnborg
2006-02-19 12:59     ` [v4l-dvb-maintainer] " Johannes Stezenbach
2006-02-19 13:19       ` Sam Ravnborg
2006-02-19 13:30         ` Johannes Stezenbach
2006-02-25 15:31           ` Adrian Bunk
2006-02-19 14:18     ` Sam Ravnborg
2006-02-19 22:38     ` Rusty Russell
2006-02-19 22:44       ` Sam Ravnborg
2006-02-18 22:12 ` kbuild: Andi Kleen
2006-02-18 22:38   ` kbuild: Sam Ravnborg
2006-02-18 23:41     ` kbuild: Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060218133459.GA14141@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=dtor_core@ameritech.net \
    --cc=dwmw2@infradead.org \
    --cc=gregkh@suse.de \
    --cc=kkeil@suse.de \
    --cc=len.brown@intel.com \
    --cc=linux-dvb-maintainer@linuxtv.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=paul@paulbristow.net \
    --cc=philb@gnu.org \
    --cc=rusty@rustcorp.com.au \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.