module_param() doesn't seem to work in 2.6.6-rc1

From: Pavel Roskin
Date: Fri Apr 16 2004 - 17:31:52 EST


I know that module_param is supposed to obsolete MODULE_PARM in 2.6
kernels. However, module_param doesn't seem to work in Linux 2.6.6-rc1 (I
didn't test older kernels, so I don't know if it's a new bug).

I don't see any way to supply description with the new interface described
in moduleparam.h. I see that some drivers (e.g. drivers/net/e100.c) use
MODULE_PARM_DESC together with module_param. This seems wrong to me.
Shouldn't a new interface provide a new way to describe the parameters?

If MODULE_PARM or module_param is used without MODULE_PARM_DESC, modinfo
(module-init-tools version 3.0) fails to list the parameter. It would be
great if the parameter was listed, even without description.

A bigger problem is that the new parameters cannot be used on the modprobe
command line. I added this to orinoco.c:

static int parmtest1, parmtest2;
MODULE_PARM(parmtest1, "i");
module_param(parmtest2, int, 644);

After compiling and installing the module I tried this:

# modprobe orinoco parmtest1=1 parmtest2=2
FATAL: Error inserting orinoco
(/lib/modules/2.6.6-rc1/kernel/drivers/net/wireless/orinoco.ko): Unknown
symbol in module, or unknown parameter (see dmesg)

Kernel log shows:
orinoco: Unknown parameter `parmtest2'

Search for module_param in the Linux Documentation directory yielded
nothing. I did notice, however, that the rate of adoption of module_param
is very low in the drivers directory. Most drivers still use MODULE_PARM.
Isn't it because module_param is totally undocumented?

$ find drivers -name '*.c' | xargs grep '\<module_param\>' | wc -l
$ find drivers -name '*.c' | xargs grep '\<MODULE_PARM\>' | wc -l

module_param is not mentioned in the sources of module-init-tools-3.0. I
found this document that mentions "Optional viewing and control through

But even when I loaded the "orinoco" module without parameters. I tried

# find /sys | grep par
# find /sys | xargs grep -i par 2>/dev/null

Relevant settings from .config:


i686, non-SMP, Fedora Core 1.

Pavel Roskin
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at