mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Fix AGP __setup warning + elsewhere
@ 2003-09-08 18:02 John Levon
  0 siblings, 0 replies; only message in thread
From: John Levon @ 2003-09-08 18:02 UTC (permalink / raw)
  To: linux-kernel


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() */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-09-08 18:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-08 18:02 [PATCH] Fix AGP __setup warning + elsewhere John Levon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®