public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/hvc: Fix warning compilation when CONFIG_HVC_XEN_FRONTEND is not enabled
@ 2014-09-11 23:50 Julien Grall
  2014-09-12  9:39 ` [Xen-devel] " David Vrabel
  0 siblings, 1 reply; 2+ messages in thread
From: Julien Grall @ 2014-09-11 23:50 UTC (permalink / raw)
  To: xen-devel
  Cc: linux-kernel, Julien Grall, Greg Kroah-Hartman, Jiri Slaby,
	David Vrabel, Paul Gortmaker, Konrad Rzeszutek Wilk

The below warning appears when the hvc xen driver is compiled without
CONFIG_HVC_XEN_FRONTEND not enabled:

drivers/tty/hvc/hvc_xen.c:333:12: warning: ‘xen_console_remove’ defined but not
used [-Wunused-function]
 static int xen_console_remove(struct xencons_info *info)
            ^

Move the #ifdef CONFIG_HVC_XEN_FRONTEND earlier to only compile
xen_console_remove, xen_cons_free, xen_cons_disconnect_backend when it's
necessary.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 drivers/tty/hvc/hvc_xen.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
index 931c72a..2fd51ac 100644
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -306,6 +306,7 @@ void xen_console_resume(void)
 		rebind_evtchn_irq(info->evtchn, info->irq);
 }
 
+#ifdef CONFIG_HVC_XEN_FRONTEND
 static void xencons_disconnect_backend(struct xencons_info *info)
 {
 	if (info->irq > 0)
@@ -346,7 +347,6 @@ static int xen_console_remove(struct xencons_info *info)
 	return 0;
 }
 
-#ifdef CONFIG_HVC_XEN_FRONTEND
 static struct xenbus_driver xencons_driver;
 
 static int xencons_remove(struct xenbus_device *dev)
-- 
1.7.10.4


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

* Re: [Xen-devel] [PATCH] xen/hvc: Fix warning compilation when CONFIG_HVC_XEN_FRONTEND is not enabled
  2014-09-11 23:50 [PATCH] xen/hvc: Fix warning compilation when CONFIG_HVC_XEN_FRONTEND is not enabled Julien Grall
@ 2014-09-12  9:39 ` David Vrabel
  0 siblings, 0 replies; 2+ messages in thread
From: David Vrabel @ 2014-09-12  9:39 UTC (permalink / raw)
  To: Julien Grall, xen-devel
  Cc: Greg Kroah-Hartman, linux-kernel, Paul Gortmaker, David Vrabel,
	Jiri Slaby

On 12/09/14 00:50, Julien Grall wrote:
> The below warning appears when the hvc xen driver is compiled without
> CONFIG_HVC_XEN_FRONTEND not enabled:
> 
> drivers/tty/hvc/hvc_xen.c:333:12: warning: ‘xen_console_remove’ defined but not
> used [-Wunused-function]
>  static int xen_console_remove(struct xencons_info *info)
>             ^
> 
> Move the #ifdef CONFIG_HVC_XEN_FRONTEND earlier to only compile
> xen_console_remove, xen_cons_free, xen_cons_disconnect_backend when it's
> necessary.

Reviewed-by: David Vrabel <david.vrabel@citrix.com>

David

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

end of thread, other threads:[~2014-09-12  9:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-11 23:50 [PATCH] xen/hvc: Fix warning compilation when CONFIG_HVC_XEN_FRONTEND is not enabled Julien Grall
2014-09-12  9:39 ` [Xen-devel] " David Vrabel

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