From patchwork Thu Oct 5 09:37:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9986679 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 38D8360247 for ; Thu, 5 Oct 2017 09:40:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2050428C03 for ; Thu, 5 Oct 2017 09:40:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14FF328C13; Thu, 5 Oct 2017 09:40:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A3C9228C03 for ; Thu, 5 Oct 2017 09:40:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e02bD-0006u3-7z; Thu, 05 Oct 2017 09:37:47 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e02bC-0006tw-KM for xen-devel@lists.xenproject.org; Thu, 05 Oct 2017 09:37:46 +0000 Received: from [85.158.143.35] by server-10.bemta-6.messagelabs.com id A1/2E-03642-96DF5D95; Thu, 05 Oct 2017 09:37:45 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrDIsWRWlGSWpSXmKPExsXitHRDpG7636u RBtMfcVt83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBn/2+cwF2wRqNh47SprA+Nqvi5GTg4JAX+J 27dWsYDYLAIqEs+3v2QFsdkElCV+dvaygdgiAkYSnXcug9UwC5RKbNr/FswWFoiVeHXoMVANB wevgIXEvWlyIGEhASuJFxs+MYHYvAKCEidnPmEBKWEW0JRYv0sfwpSWWP6PA2KgvETz1tnMID angLXE64nPwGxRoGM6l85hgZioINEx/RjTBEb+WUiGzkIYOgth6CwkQxcwsqxi1ChOLSpLLdI 1stBLKspMzyjJTczM0TU0MNPLTS0uTkxPzUlMKtZLzs/dxAgMSQYg2MF4fm3gIUZJDiYlUV6m H1cjhfiS8lMqMxKLM+KLSnNSiw8xynBwKEnwcn0AygkWpaanVqRl5gCjAyYtwcGjJML7+yNQm re4IDG3ODMdInWKUZfj0q27f5iEWPLy81KlxHl5QWYIgBRllObBjYBF6iVGWSlhXkago4R4Cl KLcjNLUOVfMYpzMCoJ894AmcKTmVcCt+kV0BFMQEfMaboCckRJIkJKqoFRYI+aNw/P0dP9d6p lvC2f+NX63L7qm859I2zd9iPxLVkR8zLl7BcsNc3eo1f+JMbS4FHG1JAFc9jENn20sL0wLev1 gaO3mG02fzj/MOkn+4MtKWqrVWb0SnEndYrKSzPqzJH42eRcYP323DstRc+VDaJtUp9cglQa+ Pu0naJsWF8ushWZaqbEUpyRaKjFXFScCAB5HV4fzwIAAA== X-Env-Sender: prvs=44491d46c=wei.liu2@citrix.com X-Msg-Ref: server-14.tower-21.messagelabs.com!1507196261!69802007!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 17642 invoked from network); 5 Oct 2017 09:37:42 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-14.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 5 Oct 2017 09:37:42 -0000 X-IronPort-AV: E=Sophos;i="5.42,481,1500940800"; d="scan'208";a="442600101" Date: Thu, 5 Oct 2017 10:37:40 +0100 From: Wei Liu To: Konrad Rzeszutek Wilk Message-ID: <20171005093740.q7wl6pggzevc7gp2@citrix.com> References: <20171005015832.GA18647@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171005015832.GA18647@localhost.localdomain> User-Agent: NeoMutt/20170113 (1.7.2) Cc: bhupinder.thakur@linaro.org, xen-devel@lists.xenproject.org, sstabellini@kernel.org, wei.liu2@citrix.com Subject: Re: [Xen-devel] ARM32 - build-issues with xen/arm: vpl011: Add a new vuart node in the xenstore X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Oct 04, 2017 at 09:58:32PM -0400, Konrad Rzeszutek Wilk wrote: > I get this when compiling under ARM32 (Ubuntu 15.04, > gcc (Ubuntu/Linaro 4.9.2-10ubuntu13) 4.9.2): > > libxl_console.c: In function ‘libxl__device_vuart_add’: > libxl_console.c:379:5: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘xen_pfn_t’ [-Werror=format=] > flexarray_append(ro_front, GCSPRINTF("%lu", state->vuart_gfn)); > ^ > ; My Wheezy 32bit chroot didn't catch this, sigh. Does the following patch work? From ae531197382bf0bc003606a9712075bdd22cfc24 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Thu, 5 Oct 2017 10:35:28 +0100 Subject: [PATCH] libxl: use correct type modifier for vuart_gfn MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes compilation error like: libxl_console.c: In function ‘libxl__device_vuart_add’: libxl_console.c:379:5: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘xen_pfn_t’ [-Werror=format=] flexarray_append(ro_front, GCSPRINTF("%lu", state->vuart_gfn)); Reported-by: Konrad Rzeszutek Wilk Signed-off-by: Wei Liu --- tools/libxl/libxl_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_console.c b/tools/libxl/libxl_console.c index 13ecf128e2..c05dc28b99 100644 --- a/tools/libxl/libxl_console.c +++ b/tools/libxl/libxl_console.c @@ -376,7 +376,7 @@ int libxl__device_vuart_add(libxl__gc *gc, uint32_t domid, flexarray_append(ro_front, "port"); flexarray_append(ro_front, GCSPRINTF("%"PRIu32, state->vuart_port)); flexarray_append(ro_front, "ring-ref"); - flexarray_append(ro_front, GCSPRINTF("%lu", state->vuart_gfn)); + flexarray_append(ro_front, GCSPRINTF("%"PRI_xen_pfn, state->vuart_gfn)); flexarray_append(ro_front, "limit"); flexarray_append(ro_front, GCSPRINTF("%d", LIBXL_XENCONSOLE_LIMIT)); flexarray_append(ro_front, "type");