The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: maximilian attems <janitor@sternwelten.at>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: lkml <linux-kernel@vger.kernel.org>, akpm <akpm@osdl.org>,
	B.Zolnierkiewicz@elka.pw.edu.pl, rusty@rustcorp.com.au
Subject: Re: [patch 2/3] hd eliminate bad section references
Date: Tue, 5 Apr 2005 01:05:43 +0200	[thread overview]
Message-ID: <20050404230543.GA14823@sputnik.stro.at> (raw)
In-Reply-To: <4251BBC5.8000802@osdl.org>

On Mon, 04 Apr 2005, Randy.Dunlap wrote:

> >-static int parse_hd_setup (char *line) {
> >+static int __init parse_hd_setup (char *line) {
.. 
> This one is fairly interesting and needs some resolution by someone
> who knows....

thanks a lot for your quick and profund feedback.
 
> On the surface, the patch is correct.
> 
> Rusty, can you explain when __setup functions are called relative
> to in-kernel init functions?  or put another way, can a __setup
> function safely call in __init function?
> 
> Here's the function in question:
> 
> static int parse_hd_setup (char *line) {
> 	int ints[6];
> 
> 	(void) get_options(line, ARRAY_SIZE(ints), ints);
> 	hd_setup(NULL, ints);
> 
> 	return 1;
> }
> __setup("hd=", parse_hd_setup);
> 
> 
> 
> Should we make parse_hd_setup() __init,
> or make hd_setup() non-__init, or something else?
> 
> {time passes, he looks]
> 
> OK, I looked at include/linux/init.h.  From what I can see
> there, __setup() causes an .init.setup section to be emitted,
> so marking __setup() function as __init would make sense.
> I think that this patch is good.

i saw that ide_setup() is __init as a bunch of lots others.
yes init.h confirms that. :)

--
maks
kernel janitor  	http://janitor.kernelnewbies.org/


  reply	other threads:[~2005-04-04 23:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-04 18:11 [patch 2/3] hd eliminate bad section references maximilian attems
2005-04-04 22:12 ` Randy.Dunlap
2005-04-04 23:05   ` maximilian attems [this message]
2005-04-05  0:00     ` 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=20050404230543.GA14823@sputnik.stro.at \
    --to=janitor@sternwelten.at \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.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