From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934409AbcAZMZ7 (ORCPT ); Tue, 26 Jan 2016 07:25:59 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:44416 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933273AbcAZMZ5 (ORCPT ); Tue, 26 Jan 2016 07:25:57 -0500 X-IronPort-AV: E=Sophos;i="5.22,350,1449532800"; d="scan'208";a="333994403" Date: Tue, 26 Jan 2016 12:25:47 +0000 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: Boris Ostrovsky CC: Arnd Bergmann , Greg Kroah-Hartman , , "Jiri Slaby" , David Vrabel , Julien Grall , Stefano Stabellini , Wei Liu , "Jan Beulich" , , Subject: Re: [PATCH 3/3] tty: hvc_xen: hide xen_console_remove when unused In-Reply-To: <56A6AA42.3000705@oracle.com> Message-ID: References: <1453758918-3577213-1-git-send-email-arnd@arndb.de> <1453758918-3577213-3-git-send-email-arnd@arndb.de> <56A6AA42.3000705@oracle.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 25 Jan 2016, Boris Ostrovsky wrote: > On 01/25/2016 04:54 PM, Arnd Bergmann wrote: > > xencons_disconnect_backend() is only called from xen_console_remove(), > > and also from xencons_probe()/xencons_resume(). But those two are also under > the > same ifdef. Good point. Aside from this the patch is good. > > 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(-) > > > > 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)); >