Re: Am I paranoid or is everyone out to break my kernel builds(Breakage in drivers/pcmcia)

From: Andrew Morton
Date: Thu Oct 21 2004 - 12:17:17 EST


Russell King <rmk+lkml@xxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Oct 21, 2004 at 02:31:35AM -0700, Andrew Morton wrote:
> > Russell King <rmk+lkml@xxxxxxxxxxxxxxxx> wrote:
> > > Take special note of the '&' before 'num' in the above initialiser, and
> > > check the structure:
> >
> > Something's out of whack with your tree. You should have:
>
> Ok, but what's the point of the change? If it's to indicate that
> we're returning a value, shouldn't the other module_param* macros
> also be fixed in the same way, or do we just like special cases?

<rusty>
module_param_array() takes a variable to put the number of elements in.
Looking through the uses, many people don't care, so they declare a dummy
or share one variable between several parameters. The latter is
problematic because sysfs uses that number to decide how many to display.

The solution is to change the variable arg to a pointer, and if the pointer
is NULL, use the "max" value. This change is fairly small, but fixing up
the callers is a lot of (trivial) churn.
</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/