From: KII Keiichi <k-keiichi@bx.jp.nec.com>
To: Satyam Sharma <ssatyam@cse.iitk.ac.in>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Matt Mackall <mpm@selenic.com>, Netdev <netdev@vger.kernel.org>,
Joel Becker <joel.becker@oracle.com>,
Stephen Hemminger <shemminger@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
David Miller <davem@davemloft.net>
Subject: Re: [PATCH v2 -mm 3/9] netconsole: Simplify boot/module option setup logic
Date: Fri, 13 Jul 2007 22:42:40 +0900 [thread overview]
Message-ID: <46978150.80909@bx.jp.nec.com> (raw)
In-Reply-To: <20070710091936.23907.68970.sendpatchset@cselinux1.cse.iitk.ac.in>
Hi Satyam,
> From: Satyam Sharma <ssatyam@cse.iitk.ac.in>
>
> [3/9] netconsole: Simplify boot/module option setup logic
>
> Presently, for built-in netconsole:
>
> __setup(..., option_setup) ensures that the option_setup() function is
> called at boot-time from obsolete_checksetup() with the string matching
> "netconsole=" passed to it from the kernel's command line. We call the
> netpoll_parse_options() from in there, and populate the netpoll struct
> with the passed values. Then, when init_netconsole() is called during the
> initcall phase, strlen(config) fails, thus skipping option_setup().
>
> For modular netconsole:
>
> module_param_string() ensures that the string corresponding to the
> "netconsole" module parameter passed from the modprobe command line is
> copied into the "config" static variable. This time, when the module is
> being initialized, strlen(config) is true and so option_setup() is called
> on "config" from init_netconsole() and the input string is parsed and the
> netpoll struct populated.
>
> Hence, quite different things happen in the copying and parsing of the
> passed netpoll parameters for the modular / built-in cases. This patch
> makes both of them similar by doing exactly the equivalent of a
> module_param_string() in option_setup() also -- just copying the param
> string passed from the kernel command line into the "config" static
> variable. So, init_netconsole() parses (using netpoll_parse_options())
> it in both the cases, and makes the logic somewhat simpler.
>
> Now, option_setup() is only ever called / used for the built-in case,
> so we put it inside a #ifndef MODULE, otherwise gcc will complain about
> option_setup() being "defined but not used".
>
> Also, the "configured" variable is redundant with this patch and so removed.
>
> Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in>
> Cc: Keiichi Kii <k-keiichi@bx.jp.nec.com>
>
Signed-off-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Thanks
--
Keiichi KII
NEC Corporation OSS Platform Development Division
E-mail: k-keiichi@bx.jp.nec.com
next prev parent reply other threads:[~2007-07-13 13:45 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 9:19 [RFC][PATCH v2 -mm 0/9] netconsole: Multiple targets and dynamic reconfigurability Satyam Sharma
2007-07-10 9:19 ` [PATCH v2 -mm 1/9] netconsole: Cleanups, codingstyle, prettyfication Satyam Sharma
2007-07-10 9:02 ` Matt Mackall
2007-07-13 13:40 ` KII Keiichi
2007-07-10 9:19 ` [PATCH v2 -mm 2/9] netconsole: Remove bogus check Satyam Sharma
2007-07-10 9:05 ` Matt Mackall
2007-07-13 13:41 ` KII Keiichi
2007-07-10 9:19 ` [PATCH v2 -mm 3/9] netconsole: Simplify boot/module option setup logic Satyam Sharma
2007-07-10 9:23 ` Matt Mackall
2007-07-13 13:42 ` KII Keiichi [this message]
2007-07-10 9:19 ` [PATCH v2 -mm 4/9] netconsole: Add some useful tips to documentation Satyam Sharma
2007-07-10 9:41 ` Matt Mackall
2007-07-10 12:34 ` Jesper Juhl
2007-07-10 22:10 ` Satyam Sharma
2007-07-11 4:20 ` Joel Becker
2007-07-11 6:05 ` Satyam Sharma
2007-07-11 11:56 ` Jesper Juhl
2007-07-10 9:19 ` [PATCH v2 -mm 5/9] netconsole: Introduce netconsole_target Satyam Sharma
2007-07-13 13:46 ` KII Keiichi
2007-07-10 9:19 ` [PATCH v2 -mm 6/9] netconsole: Introduce netconsole_netdev_notifier Satyam Sharma
2007-07-13 13:47 ` KII Keiichi
2007-07-10 9:19 ` [PATCH v2 -mm 7/9] netconsole: Use netif_running() in write_msg() Satyam Sharma
2007-07-13 13:48 ` KII Keiichi
2007-07-10 9:20 ` [PATCH v2 -mm 8/9] netconsole: Support multiple logging targets Satyam Sharma
2007-07-10 10:23 ` Duane Griffin
2007-07-10 22:17 ` Satyam Sharma
2007-07-11 4:29 ` Joel Becker
2007-07-11 6:24 ` Satyam Sharma
2007-07-13 13:49 ` KII Keiichi
2007-07-10 9:20 ` [PATCH v2 -mm 9/9] netconsole: Support dynamic reconfiguration using configfs Satyam Sharma
2007-07-12 10:04 ` Keiichi KII
2007-07-12 17:08 ` Satyam Sharma
2007-07-13 13:50 ` KII Keiichi
2007-07-11 9:59 ` [RFC][PATCH v2 -mm 0/9] netconsole: Multiple targets and dynamic reconfigurability Keiichi KII
2007-07-13 13:39 ` KII Keiichi
2007-07-13 17:30 ` Satyam Sharma
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=46978150.80909@bx.jp.nec.com \
--to=k-keiichi@bx.jp.nec.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=joel.becker@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.org \
--cc=ssatyam@cse.iitk.ac.in \
/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 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).