Re: [PATCH] PARAM 2/4

Jeff Garzik (jgarzik@pobox.com)
Fri, 15 Nov 2002 17:51:48 -0500


Rusty Russell wrote:

> Just fixed arch/i386/mach-voyager/setup_arch_pre.h from previous send.
>
> Makes a nice, easy to use, hard to misuse PARAM() macro for modules
> and boot parameters alike. Implements the types required for current
> kernel usage.
>
> Jeff Garzik doesn't like the name PARAM (I had to rename the
> asm-i386/setup.h PARAM to "PARAMS", but it's only used in that header
> and one other. I can't think of a better name. KPARAM seems
> redundant. MODULE_PARAM is misleading and wrong.

That's only because you never bother with drivers.
_Please_ look at the bigger picture.

1) I note you ignored Matthew Wilcox's example of module_init being used
in two different ways.

2) "proper", converted-to-Rusty-style driver code is going to have

MODULE_blah
MODULE_foo
MODULE_bar
PARAM

You think that looks good??

3) modules a.k.a. drivers are going to be the more common users of this
interface.

4) even where arch code uses boot cmdline params, they are typically
clustered together, which makes their purpose all the more obvious.

> OTOH, linux/param.h was taken, so I put it in linux/params.h, which is
> pretty sucky.

Another namespace collision? Who would have thought...

PARAM is ugly in drivers, and way too generic.

Jeff

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