All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: kernel-janitors@vger.kernel.org
Subject: Re: getting rid of "fs_initcall" from drivers/ code
Date: Wed, 06 Aug 2008 02:47:43 +0000	[thread overview]
Message-ID: <20080806024743.GE2055@parisc-linux.org> (raw)
In-Reply-To: <alpine.LFD.1.10.0808052206430.20743@localhost.localdomain>

On Tue, Aug 05, 2008 at 10:27:03PM -0400, Robert P. J. Day wrote:
> ok ... what is the point of the following?
> 
> #ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE
> fs_initcall(cpufreq_gov_userspace_init);
> #else
> module_init(cpufreq_gov_userspace_init);
> #endif
> 
> and why can't it be reduced?

That's a silly author.  The correct patch would look something like
this:

-#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE
 fs_initcall(cpufreq_gov_userspace_init);
-#else
-module_init(cpufreq_gov_userspace_init);
-#endif

I couldn't tell you why this needs to be an fs_initcall rather than a
plain module_init() (aka device_initcall()).  IMO every use of
fs_initcall() in a module needs to document what ordering problem it's
solving.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  parent reply	other threads:[~2008-08-06  2:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-06  2:07 getting rid of "fs_initcall" from drivers/ code Robert P. J. Day
2008-08-06  2:25 ` Matthew Wilcox
2008-08-06  2:27 ` Robert P. J. Day
2008-08-06  2:47 ` Matthew Wilcox [this message]
2008-08-06  2:51 ` Robert P. J. Day
2008-08-06  7:30 ` Johannes Weiner
2008-08-06 10:02 ` Robert P. J. Day
2008-08-06 12:09 ` Matthew Wilcox
2008-08-06 13:54 ` Matthew Wilcox

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=20080806024743.GE2055@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=kernel-janitors@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.