From: Rusty Russell This patch adds a warning whenever MODULE_PARM is used. Successive patches change them over to module_param. Help appreciated! Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton --- 25-akpm/include/linux/module.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff -puN include/linux/module.h~module_parm-must-die-make-it-warn-first include/linux/module.h --- 25/include/linux/module.h~module_parm-must-die-make-it-warn-first Wed Oct 20 16:09:31 2004 +++ 25-akpm/include/linux/module.h Wed Oct 20 16:09:31 2004 @@ -558,13 +558,15 @@ struct obsolete_modparm { char type[64-sizeof(void *)]; void *addr; }; + +extern void __deprecated MODULE_PARM_(void); #ifdef MODULE /* DEPRECATED: Do not use. */ #define MODULE_PARM(var,type) \ struct obsolete_modparm __parm_##var __attribute__((section("__obsparm"))) = \ -{ __stringify(var), type }; +{ __stringify(var), type, &MODULE_PARM_ }; #else -#define MODULE_PARM(var,type) +#define MODULE_PARM(var,type) static void __attribute_unused__ *__parm_##var = &MODULE_PARM_; #endif #define __MODULE_STRING(x) __stringify(x) _