Re: linux-next: rr tree build failure

From: Rusty Russell
Date: Sun Nov 23 2008 - 23:08:57 EST


On Saturday 22 November 2008 17:11:32 Greg KH wrote:
> On Sat, Nov 22, 2008 at 01:01:06PM +1030, Rusty Russell wrote:
> > Fair enough. Patch below does this as moduleparam.h suggests.
> >
> > It still means that the paremeter appears in
> > /sys/module/kernel/parameters/nousb OR
> > /sys/module/usbcore/parameters/nousb.
>
> What's the "OR" part? What determines where it goes?

Whether usbcore is a module or not, of course.

> > +/* To disable USB, kernel command line is 'nousb' not 'usbcore.nousb' */
> > +#undef MODULE_PARAM_PREFIX
> > +#define MODULE_PARAM_PREFIX
> > +module_param(nousb, bool, 0444);
>
> That undef seems hacky beyond belief.

*Exactly*. And while you're not the first person to do this, you're the one
one to use it for code which can be a module :(

> How would one know to do this?

The same way Pete found __module_param_call, by reading the header:

/* You can override this manually, but generally this should match the
module name. */
#ifdef MODULE
#define MODULE_PARAM_PREFIX /* empty */
#else
#define MODULE_PARAM_PREFIX KBUILD_MODNAME "."
#endif

Cheers,
Rusty.
--
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/