From: Tom Rini <trini@kernel.crashing.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [patch 1/22] Add __early_param for all arches
Date: Wed, 31 Mar 2004 09:13:05 -0700 [thread overview]
Message-ID: <20040331161305.GK13819@smtp.west.cox.net> (raw)
In-Reply-To: <1080706985.29195.12.camel@bach>
On Wed, Mar 31, 2004 at 02:23:05PM +1000, Rusty Russell wrote:
> On Thu, 2004-03-25 at 10:57, trini@kernel.crashing.org wrote:
> > +void __init parse_early_options(char **cmdline_p)
>
> Please, don't do it this way.
>
> __setup() has icky semantics which are only used in three places (ide,
> ppc64's eeh, and um's eth). The string is a prefix and the rest of the
> parameter is handed to the fn as an arg. Meaning misspellings aren't
> usually caught, and accidental name reuse is hard to catch.
>
> Secondly, we already have a parser in the kernel.
>
> I like the idea of cleaning up saved_command_line crap: ideally
> the archs would just assign to a global "command_line" var, and
> anyone wanting to write to it would make their own copies.
>
> How's this version, instead? If you agree, I'll produce a merged
> version.
My first concern is can parse_args & co really be run so very early on ?
Also:
> +/* Arch code calls this early on. */
> +void __init parse_early_options(const char *saved_command_line)
> +{
> + static char __initdata command_line[COMMAND_LINE_SIZE];
> + strcpy(command_line, saved_command_line);
Really should be:
/* i386 goes right to saved_command_line */
if (*cmdline_p != saved_command_line)
memcpy(saved_command_line, *cmdline_p, COMMAND_LINE_SIZE);
/* ensure NUL terminated. */
saved_command_line[COMMAND_LINE_SIZE - 1] = '\0';
--
Tom Rini
http://gate.crashing.org/~trini/
next prev parent reply other threads:[~2004-03-31 16:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-24 23:57 trini
2004-03-25 3:55 ` Andrew Morton
2004-03-26 11:29 ` David Woodhouse
2004-03-26 21:03 ` Russell King
2004-03-26 21:15 ` David Woodhouse
2004-03-31 4:23 ` Rusty Russell
2004-03-31 16:13 ` Tom Rini [this message]
2004-04-01 1:51 ` Rusty Russell
2004-04-01 2:24 ` Tom Rini
2004-04-01 2:56 ` Rusty Russell
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=20040331161305.GK13819@smtp.west.cox.net \
--to=trini@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®