Re: [PATCH 1/4] tracing/events: fix compile for modules disabled

From: Steven Rostedt
Date: Wed Apr 15 2009 - 12:27:48 EST





On Wed, 15 Apr 2009, Frederic Weisbecker wrote:
> > +#else
> > +static int trace_module_notify(struct notifier_block *self,
> > + unsigned long val, void *data)
>
>
>
> I don't remember when you register the module notifier but
> I guess it is on init time, then you can set this func as __init
> if !CONFIG_MODULES.
>
>
> > +{
> > + return 0;
> > +}
> > +#endif /* CONFIG_MODULES */
> >
> > struct notifier_block trace_module_nb = {
> > .notifier_call = trace_module_notify,
>
>
> And then you can set this struct as __initdata_or_module, so
> that you can safely register this module notifier whatever
> config you have, and without consuming any space on the off case.

Good point. I'll update that.

-- Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/