From patchwork Thu Sep 11 23:50:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 37283 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2682920CA0 for ; Thu, 11 Sep 2014 23:51:42 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id p10sf30934752pdj.0 for ; Thu, 11 Sep 2014 16:51:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=sXtWLZqN+9YM4Z4AK0q+2XwzeRNgNoxTsXY7ENIaCm4=; b=ivI0huC4AYSVHPYmcxX8ssRTfVV7Kx/G2XvtcfkvF6+G/OR4PcofQjhwfxA0WRI0sw Y8AmX9VYHbdzKkttojEJvtpODFUsvf+Yr5W7enMjeb6InTB1Cq2anTFunu5wwqgcmxwN CiCKTepVJ7niTwzS+Nt3XXfrgO3pcqu0llRtXr3Q6Su1wIJaWhFjUM8thZLb8HTiSoMh XYWpPuJhtx/2+908sYhEfgcYcDq80L7TgkSXKxUW040T0+8ZstoLXBQ58XwbD0JjJ0aA Yp2ACslOVKBN6iFmp/qynbV+iTt/cNGoxdld+lp+/PVVVSLoEYJQ7BCsrK4INBOHKZ4E 7H2A== X-Gm-Message-State: ALoCoQlzy0awWimWJF1OqwbU+oqIvAAfX+W/o6L30foxcWcldFTaInp0RYceKKl47qJKrtn/X0mn X-Received: by 10.66.141.70 with SMTP id rm6mr2432368pab.37.1410479501368; Thu, 11 Sep 2014 16:51:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.47.140 with SMTP id m12ls393513qga.84.gmail; Thu, 11 Sep 2014 16:51:41 -0700 (PDT) X-Received: by 10.220.44.136 with SMTP id a8mr3524713vcf.42.1410479501237; Thu, 11 Sep 2014 16:51:41 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id ej9si1598109vcb.25.2014.09.11.16.51.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Sep 2014 16:51:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hy10so7386381vcb.3 for ; Thu, 11 Sep 2014 16:51:41 -0700 (PDT) X-Received: by 10.221.68.66 with SMTP id xx2mr3452416vcb.1.1410479501017; Thu, 11 Sep 2014 16:51:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp665864vcb; Thu, 11 Sep 2014 16:51:40 -0700 (PDT) X-Received: by 10.66.227.225 with SMTP id sd1mr6209613pac.106.1410479499978; Thu, 11 Sep 2014 16:51:39 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zy4si4301112pab.221.2014.09.11.16.51.39 for ; Thu, 11 Sep 2014 16:51:39 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754594AbaIKXvf (ORCPT + 27 others); Thu, 11 Sep 2014 19:51:35 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:61797 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754085AbaIKXve (ORCPT ); Thu, 11 Sep 2014 19:51:34 -0400 Received: by mail-wg0-f51.google.com with SMTP id k14so5911955wgh.10 for ; Thu, 11 Sep 2014 16:51:32 -0700 (PDT) X-Received: by 10.180.211.102 with SMTP id nb6mr6502113wic.11.1410479492823; Thu, 11 Sep 2014 16:51:32 -0700 (PDT) Received: from belegaer.uk.xensource.com ([185.25.64.249]) by mx.google.com with ESMTPSA id qd1sm7930wic.8.2014.09.11.16.51.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Sep 2014 16:51:32 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Cc: linux-kernel@vger.kernel.org, Julien Grall , Greg Kroah-Hartman , Jiri Slaby , David Vrabel , Paul Gortmaker , Konrad Rzeszutek Wilk Subject: [PATCH] xen/hvc: Fix warning compilation when CONFIG_HVC_XEN_FRONTEND is not enabled Date: Fri, 12 Sep 2014 00:50:59 +0100 Message-Id: <1410479459-20353-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: David Vrabel Cc: Paul Gortmaker Cc: Konrad Rzeszutek Wilk Reviewed-by: David Vrabel --- 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)