]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
tty: hvc_xen: hide xen_console_remove when unused
authorArnd Bergmann <arnd@arndb.de>
Mon, 25 Jan 2016 21:54:58 +0000 (22:54 +0100)
committerSasha Levin <alexander.levin@microsoft.com>
Sun, 4 Mar 2018 15:28:30 +0000 (10:28 -0500)
[ Upstream commit e36ae3439936e13c33f5841c7c2c1a9875acbb6d ]

xencons_disconnect_backend() is only called from xen_console_remove(),
which is conditionally compiled, so we get a harmless warning when
CONFIG_HVC_XEN_FRONTEND is unset:

hvc/hvc_xen.c:350:12: error: 'xen_console_remove' defined but not used [-Werror=unused-function]

This moves the function down into the same #ifdef section to silence
the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/tty/hvc/hvc_xen.c

index 7a3d146a5f0efc0dbc3b94e854adb4d81c85da4d..5cc3ca1dd5c9dda4b79e37c0e051969566a32cb6 100644 (file)
@@ -322,6 +322,7 @@ void xen_console_resume(void)
        }
 }
 
+#ifdef CONFIG_HVC_XEN_FRONTEND
 static void xencons_disconnect_backend(struct xencons_info *info)
 {
        if (info->irq > 0)
@@ -362,7 +363,6 @@ static int xen_console_remove(struct xencons_info *info)
        return 0;
 }
 
-#ifdef CONFIG_HVC_XEN_FRONTEND
 static int xencons_remove(struct xenbus_device *dev)
 {
        return xen_console_remove(dev_get_drvdata(&dev->dev));