Hi, Matthew Wilcox <matthew@xxxxxx> writes: > 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. Sorry, my fault. > 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. The cpu-specific driver used to call into the default governor before it was initialized. See 6915719b36a97d28fab576c6fa2a20364b435fe6. Having a verbose ifdef with the config option, I hoped, would explain it as in 'initialize the thing early if it is the default governor'. But I agree that a plain fs_initcall() with a comment above it would be perhaps less ugly. Hannes -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html