Sorry, the syntax is "insmod wdt.o io=0x260 irq=11" and it does work if
they are static. I tested this before mailing with "insmod ne.o io=...
irq=...", various combinations of io and irq, all were picked up by
ne.o and, surprise, surprise, ne.c already contains
static int io[MAX_NE_CARDS] = { 0, };
static int irq[MAX_NE_CARDS] = { 0, };
The majority of modules correctly define their insmod target variables
as static, it is only a few that are breaking the convention.
> And probably this is inside a #ifdef MODULE, so you hav'nt problems with
> name clashes when compiling it into the kernel...
That is correct to some extent, the linker sees no conflict because the
code is compiled as a module. However programming style says that
variables should be correctly scoped for humans as well as programs, to
quote from Documentation/CodingStyle :-
"GLOBAL variables (to be used only if you _really_ need them) need to
have descriptive names, as do global functions. If you have a function
that counts the number of active users, you should call that
"count_active_users()" or similar, you should _not_ call it "cntusr()".
"
CodingStyle does not mention static but (IMHO) a global non-static
variable without a *globally* meaningful name is wrong. If it is meant
to be globally used, give it a decent name, if it is not meant to be
globally used, declare it static.