lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 12 Sep 2014 00:50:59 +0100
From:	Julien Grall <julien.grall@...aro.org>
To:	xen-devel@...ts.xenproject.org
Cc:	linux-kernel@...r.kernel.org,
	Julien Grall <julien.grall@...aro.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jslaby@...e.cz>,
	David Vrabel <david.vrabel@...rix.com>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Subject: [PATCH] xen/hvc: Fix warning compilation when CONFIG_HVC_XEN_FRONTEND is not enabled

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@...aro.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Jiri Slaby <jslaby@...e.cz>
Cc: David Vrabel <david.vrabel@...rix.com>
Cc: Paul Gortmaker <paul.gortmaker@...driver.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ