Fix AGP __setup warning + elsewhere
PATCH 1/1 Fix AGP __setup warning + elsewhere
drivers/char/agp/backend.c:322: warning: `agp_setup' defined but not used
Whilst __setup is allegedly obsolete, this usage at least is going to stay around, and there are plenty of other places that currently have unnecessary #ifdefs (any place that's worried about a few bytes of module size bloat can still keep the ifdefs of course ...)
This just uses the same trick as module_init() to avoid the warning.
regards
john
include/linux/init.h +3 -1
@@ -167,7 +167,9 @@ struct obs_kernel_param { {return exitfn; } \ void cleanup_module(void) __attribute__((alias(#exitfn))); -#define __setup (str,func)/* nothing */ +#define __setup (str,func) \ + static inline int (*__setup_dummy_##func(void))(char *) \ + { return func; }#endif /* Data marked not to be saved by software_suspend() */