Messages in this thread Patch in this message | | | Date | Mon, 8 Sep 2003 19:02:21 +0100 | From | John Levon <> | Subject | [PATCH] 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
diff -Naurp -X dontdiff linux-cvs/include/linux/init.h linux-fixes/include/linux/init.h --- linux-cvs/include/linux/init.h 2003-06-14 16:54:23.000000000 +0100 +++ linux-fixes/include/linux/init.h 2003-09-08 19:01:59.000000000 +0100 @@ -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() */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |