From patchwork Mon Jan 25 21:54:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101094 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1613551lbb; Mon, 25 Jan 2016 13:56:38 -0800 (PST) X-Received: by 10.66.235.202 with SMTP id uo10mr28983165pac.63.1453758998312; Mon, 25 Jan 2016 13:56:38 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z88si36317761pfi.50.2016.01.25.13.56.38; Mon, 25 Jan 2016 13:56:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932406AbcAYV4g (ORCPT + 30 others); Mon, 25 Jan 2016 16:56:36 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:65411 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932084AbcAYV4f (ORCPT ); Mon, 25 Jan 2016 16:56:35 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0MdCIE-1aewWY2mZO-00IE6R; Mon, 25 Jan 2016 22:55:52 +0100 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Jiri Slaby , David Vrabel , Julien Grall , Stefano Stabellini , Wei Liu , Jan Beulich , Boris Ostrovsky , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] tty: hvc_xen: hide xen_console_remove when unused Date: Mon, 25 Jan 2016 22:54:58 +0100 Message-Id: <1453758918-3577213-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1453758918-3577213-1-git-send-email-arnd@arndb.de> References: <1453758918-3577213-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:bygCPuum5Z6lQZjwnrRAVuzZ9mmN+60A99Dsgi+k7J9oBm96aL+ IvO6Olf+CHsLf8Xo3UL3J13FTD8lmoUXARhgF/kNDkdUbDAvdNcnlU0rEIbxC27wCewvRBb Mx9VPDBYRox7qXlHoyNRnb4A6e2DXYdMPok0PqyseUEiGU/a29WVPKS+BnIGKbSycXAlrBH GGVLAelpQuU59HD7pW0kA== X-UI-Out-Filterresults: notjunk:1; V01:K0:xJ4EgY0F6U0=:2BSDvUch3ETtbnhwsGLV3S CZ2mbDnmhXdLSXLWwQtqtNu4YHiDBSp2KgYfWZ5DTk2fNRkfO9HI37DGcT5rj1hHULfpJF/Qy 0eZunsb3PIW9hezr9zogVxQgOffl3v003LqqATENJM9qn69eCLRCS/q6XbD1VU0su/GpJDWod GwTNhZC0mjHy7ddAs2yeIInhmrp4Bt/GLXpGL0GntgGVoyjt+Bu4w/uuoFsAyKesoqOn+LOzc HPdcv+B17CipCVOlk9SHGPvA4DvmyCBli5p4nkvQu+FGjxxyN9NfNmYAV/nNLayN9VHaSmJaH YXF/J8xAOptyNKifL4SliFv4ZF3+cPGszZCM7YW8XJCQ2O47P9ptuzpYqyW+PaR+Zq5u155r7 D0dqoJBDPh9VvDl/xOQIm7QuZwux395dQWA1j1m8rODmIqQEeZfV3lukg3E7af20p5cUGCv3h gvKhRRdpjin6FbqcVXtaDjIyoKOoHSr2c353yQ1rbQ+RJ5eNZ0mL9fGVtZi8HR9M/RmTZPciP YEvz84I4BFJwPu8bqiPhevGVzq2HErdz4WLxfPYbsxkXlohD5pkNNIGZr66Cdy37D/rM8izIR N+FWIjiOMuGRdpvHGuGV0XxQ1TU7EDtIPsDhV9DqrMxVpNrJ8yAR5WaIOJXPeK8pUTG1KY02g pz+Do6ADu6VvMi/KWLIGc2hllSSaBWOvlNMjdM25jm5hMCT/Dh9DITeTzpctX8VJOp68= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/tty/hvc/hvc_xen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index fa816b7193b6..11725422dacb 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c @@ -323,6 +323,7 @@ void xen_console_resume(void) } } +#ifdef CONFIG_HVC_XEN_FRONTEND static void xencons_disconnect_backend(struct xencons_info *info) { if (info->irq > 0) @@ -363,7 +364,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));