From: Magnus Damm <magnus.damm@gmail.com>
To: Horst von Brand <vonbrand@inf.utfsm.cl>
Cc: AsterixTheGaul <asterixthegaul@gmail.com>,
Magnus Damm <damm@opensource.se>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC] disable built-in modules V2
Date: Thu, 7 Apr 2005 23:33:25 +0200 [thread overview]
Message-ID: <aec7e5c3050407143345397639@mail.gmail.com> (raw)
In-Reply-To: <200504070238.j372cGQN005597@laptop11.inf.utfsm.cl>
On Apr 7, 2005 4:38 AM, Horst von Brand <vonbrand@inf.utfsm.cl> wrote:
> AsterixTheGaul <asterixthegaul@gmail.com> said:
> > > -#define module_init(x) __initcall(x);
> > > +#define module_init(x) __initcall(x); __module_init_disable(x);
> >
> > It would be better if there is brackets around them... like
> >
> > #define module_init(x) { __initcall(x); __module_init_disable(x); }
> >
> > then we know it wont break some code like
> >
> > if (..)
> > module_init(x);
>
> But happily break:
>
> if (...)
> module_init(x);
> else
> ...
>
> This should be:
>
> #define module_init(x) do {__initcall(x); __module_init_disable(x);}while(0)
Yes and no. =) Wrapping defines in do {} while(0) is nice when you are
using the defined constants inside functions. module_init() OTOH is
never used inside a function and your suggestion leads to compile
errors:
CC arch/i386/kernel/dmi_scan.o
CC arch/i386/kernel/bootflag.o
arch/i386/kernel/bootflag.c:99: error: parse error before "do"
arch/i386/kernel/bootflag.c:99: error: parse error before '}' token
make[1]: *** [arch/i386/kernel/bootflag.o] Error 1
make: *** [arch/i386/kernel] Error 2
damm@clementine linux-2.6.12-rc2-disable_builtin $
/ magnus
prev parent reply other threads:[~2005-04-07 21:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-05 23:29 [PATCH][RFC] disable built-in modules V2 Magnus Damm
2005-04-06 10:32 ` Malcolm Rowe
2005-04-06 13:10 ` Magnus Damm
2005-04-06 14:28 ` Malcolm Rowe
2005-04-06 22:14 ` Magnus Damm
2005-04-07 7:47 ` Zwane Mwaikambo
2005-04-07 1:32 ` AsterixTheGaul
2005-04-07 2:23 ` Roland Dreier
2005-04-07 8:23 ` Magnus Damm
2005-04-07 17:01 ` Randy.Dunlap
2005-04-07 17:22 ` Richard B. Johnson
2005-04-07 17:29 ` Randy.Dunlap
2005-04-07 18:53 ` Magnus Damm
2005-04-09 1:42 ` Herbert Xu
2005-04-09 9:43 ` Magnus Damm
2005-04-09 9:48 ` Herbert Xu
2005-04-09 10:03 ` Magnus Damm
2005-04-09 10:07 ` Herbert Xu
2005-04-09 10:14 ` Magnus Damm
2005-04-07 17:37 ` Dave Jones
2005-04-07 2:38 ` Horst von Brand
2005-04-07 21:33 ` Magnus Damm [this message]
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=aec7e5c3050407143345397639@mail.gmail.com \
--to=magnus.damm@gmail.com \
--cc=asterixthegaul@gmail.com \
--cc=damm@opensource.se \
--cc=linux-kernel@vger.kernel.org \
--cc=vonbrand@inf.utfsm.cl \
/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