From: Chris Friesen <cfriesen@nortelnetworks.com>
To: Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl>
Cc: Stuart MacDonald <stuartm@connecttech.com>,
kernel list <linux-kernel@vger.kernel.org>
Subject: Re: Non-__init functions calling __init functions
Date: Thu, 20 Mar 2003 12:01:57 -0500 [thread overview]
Message-ID: <3E79F405.9030705@nortelnetworks.com> (raw)
In-Reply-To: 200303201632.h2KGW8Vu002620@green.mif.pg.gda.pl
Andrzej Krzysztofowicz wrote:
> Not always possible.
>
> __init A() {
> ...
> }
>
> __exit B() {
> ...
> }
>
> C() {
> ...
> A();
> ...
> #ifdef MODULE
> B();
> #endif
> ...
> }
>
> C cannot be marked __init for #define MODULE case. Even if it is called only
> by some __init code. I can imagine other similar situations.
I thought that in the case of modules, __init is a noop? At least, that's what
this page says
http://www.netfilter.org/unreliable-guides/kernel-hacking/routines-init.html
So if MODULE is defined, it doesn't matter if C is labelled as __init or not,
and if it is not defined, it *should* be labelled as __init since it is itself
calling __init code.
Chris
--
Chris Friesen | MailStop: 043/33/F10
Nortel Networks | work: (613) 765-0557
3500 Carling Avenue | fax: (613) 765-2986
Nepean, ON K2H 8E9 Canada | email: cfriesen@nortelnetworks.com
next prev parent reply other threads:[~2003-03-20 16:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-20 16:15 Non-__init functions calling __init functions Andrzej Krzysztofowicz
2003-03-20 16:23 ` Stuart MacDonald
2003-03-20 16:32 ` Andrzej Krzysztofowicz
2003-03-20 17:01 ` Chris Friesen [this message]
2003-03-21 9:10 ` Andrzej Krzysztofowicz
-- strict thread matches above, loose matches on Subject: below --
2003-03-20 16:03 Stuart MacDonald
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=3E79F405.9030705@nortelnetworks.com \
--to=cfriesen@nortelnetworks.com \
--cc=ankry@green.mif.pg.gda.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=stuartm@connecttech.com \
/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