All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 5/6] uml: fix an "unused" warnings
@ 2004-10-12  0:16 ` blaisorblade_spam
  0 siblings, 0 replies; 2+ messages in thread
From: blaisorblade_spam @ 2004-10-12  0:16 UTC (permalink / raw)
  To: akpm; +Cc: jdike, linux-kernel, user-mode-linux-devel, blaisorblade_spam


Fixes some random warnings. To avoid "defined but not used" for
not_configged_ops, make it be defined only if at least one channel is not defined.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
---

 linux-2.6.9-current-paolo/arch/um/Kconfig_char        |    4 ++++
 linux-2.6.9-current-paolo/arch/um/drivers/chan_kern.c |    2 ++
 2 files changed, 6 insertions(+)

diff -puN arch/um/drivers/chan_kern.c~uml-fix-some-warnings arch/um/drivers/chan_kern.c
--- linux-2.6.9-current/arch/um/drivers/chan_kern.c~uml-fix-some-warnings	2004-09-19 18:27:33.885887560 +0200
+++ linux-2.6.9-current-paolo/arch/um/drivers/chan_kern.c	2004-09-19 18:27:33.888887104 +0200
@@ -19,6 +19,7 @@
 #include "line.h"
 #include "os.h"
 
+#ifdef CONFIG_NOCONFIG_CHAN
 static void *not_configged_init(char *str, int device, struct chan_opts *opts)
 {
 	printk(KERN_ERR "Using a channel type which is configured out of "
@@ -87,6 +88,7 @@ static struct chan_ops not_configged_ops
 	.free		= not_configged_free,
 	.winch		= 0,
 };
+#endif /* CONFIG_NOCONFIG_CHAN */
 
 void generic_close(int fd, void *unused)
 {
diff -puN arch/um/Kconfig_char~uml-fix-some-warnings arch/um/Kconfig_char
--- linux-2.6.9-current/arch/um/Kconfig_char~uml-fix-some-warnings	2004-09-19 18:27:33.886887408 +0200
+++ linux-2.6.9-current-paolo/arch/um/Kconfig_char	2004-09-19 18:27:33.888887104 +0200
@@ -72,6 +72,10 @@ config XTERM_CHAN
         well, since UML's gdb currently requires an xterm.
         It is safe to say 'Y' here.
 
+config NOCONFIG_CHAN
+	bool
+	default !(XTERM_CHAN && TTY_CHAN && PTY_CHAN && PORT_CHAN && FD_CHAN && NULL_CHAN)
+
 config CON_ZERO_CHAN
 	string "Default main console channel initialization"
 	default "fd:0,fd:1"
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [uml-devel] [patch 5/6] uml: fix an "unused" warnings
@ 2004-10-12  0:16 ` blaisorblade_spam
  0 siblings, 0 replies; 2+ messages in thread
From: blaisorblade_spam @ 2004-10-12  0:16 UTC (permalink / raw)
  To: akpm; +Cc: jdike, linux-kernel, user-mode-linux-devel, blaisorblade_spam


Fixes some random warnings. To avoid "defined but not used" for
not_configged_ops, make it be defined only if at least one channel is not defined.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
---

 linux-2.6.9-current-paolo/arch/um/Kconfig_char        |    4 ++++
 linux-2.6.9-current-paolo/arch/um/drivers/chan_kern.c |    2 ++
 2 files changed, 6 insertions(+)

diff -puN arch/um/drivers/chan_kern.c~uml-fix-some-warnings arch/um/drivers/chan_kern.c
--- linux-2.6.9-current/arch/um/drivers/chan_kern.c~uml-fix-some-warnings	2004-09-19 18:27:33.885887560 +0200
+++ linux-2.6.9-current-paolo/arch/um/drivers/chan_kern.c	2004-09-19 18:27:33.888887104 +0200
@@ -19,6 +19,7 @@
 #include "line.h"
 #include "os.h"
 
+#ifdef CONFIG_NOCONFIG_CHAN
 static void *not_configged_init(char *str, int device, struct chan_opts *opts)
 {
 	printk(KERN_ERR "Using a channel type which is configured out of "
@@ -87,6 +88,7 @@ static struct chan_ops not_configged_ops
 	.free		= not_configged_free,
 	.winch		= 0,
 };
+#endif /* CONFIG_NOCONFIG_CHAN */
 
 void generic_close(int fd, void *unused)
 {
diff -puN arch/um/Kconfig_char~uml-fix-some-warnings arch/um/Kconfig_char
--- linux-2.6.9-current/arch/um/Kconfig_char~uml-fix-some-warnings	2004-09-19 18:27:33.886887408 +0200
+++ linux-2.6.9-current-paolo/arch/um/Kconfig_char	2004-09-19 18:27:33.888887104 +0200
@@ -72,6 +72,10 @@ config XTERM_CHAN
         well, since UML's gdb currently requires an xterm.
         It is safe to say 'Y' here.
 
+config NOCONFIG_CHAN
+	bool
+	default !(XTERM_CHAN && TTY_CHAN && PTY_CHAN && PORT_CHAN && FD_CHAN && NULL_CHAN)
+
 config CON_ZERO_CHAN
 	string "Default main console channel initialization"
 	default "fd:0,fd:1"
_


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-12  0:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-12  0:16 [patch 5/6] uml: fix an "unused" warnings blaisorblade_spam
2004-10-12  0:16 ` [uml-devel] " blaisorblade_spam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.