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

Andrew Morton
2004-10-21T09:40:53Z

Russell King <rmk+lkml@arm.linux.org.uk> wrote:
>
> It would appear that this change:
>
> -module_param_array(irq_list, int, irq_list_count, 0444);
> +module_param_array(irq_list, int, &irq_list_count, 0444);
>
> given:
>
> static int irq_list[16];
> static int irq_list_count;
>
> breaks PCMCIA drivers. Why?
>
> #define module_param_array(name, type, num, perm) \
> module_param_array_named(name, name, type, num, perm)
>
> #define module_param_array_named(name, array, type, num, perm) \
> static struct kparam_array __param_arr_##name \
> = { ARRAY_SIZE(array), &num, param_set_##type, param_get_##type,\
> sizeof(array[0]), array }; \
> module_param_call(name, param_array_set, param_array_get, \
> &__param_arr_##name, perm)
>
> 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:

#define module_param_array_named(name, array, type, nump, perm) \
static struct kparam_array __param_arr_##name \
= { ARRAY_SIZE(array), nump, param_set_##type, param_get_##type,\