From patchwork Mon Apr 24 21:25:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 754446 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wBfXb74tvz9s8V for ; Tue, 25 Apr 2017 07:26:07 +1000 (AEST) Received: from localhost ([::1]:46022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2lUi-00009c-Dv for incoming@patchwork.ozlabs.org; Mon, 24 Apr 2017 17:26:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2lUM-00007y-G1 for qemu-devel@nongnu.org; Mon, 24 Apr 2017 17:25:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2lUJ-00055o-1B for qemu-devel@nongnu.org; Mon, 24 Apr 2017 17:25:42 -0400 Received: from mail.kernel.org ([198.145.29.136]:36220) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d2lUI-00055P-Ou for qemu-devel@nongnu.org; Mon, 24 Apr 2017 17:25:38 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 441ED20145; Mon, 24 Apr 2017 21:25:36 +0000 (UTC) Received: from [10.149.184.130] (unknown [99.165.194.18]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5CD5520103; Mon, 24 Apr 2017 21:25:34 +0000 (UTC) Date: Mon, 24 Apr 2017 14:25:31 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-X260 To: Peter Maydell In-Reply-To: Message-ID: References: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 198.145.29.136 Subject: Re: [Qemu-devel] [PULL 0/21] Please pull xen-20170421-tag for 2.10 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Stefan Hajnoczi , QEMU Developers , groug@kaod.org, aneesh.kumar@linux.vnet.ibm.com, Stefan Hajnoczi , Anthony PERARD , xen-devel@lists.xenproject.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" On Mon, 24 Apr 2017, Peter Maydell wrote: > On 21 April 2017 at 21:14, Stefano Stabellini wrote: > > The following changes since commit 55a19ad8b2d0797e3a8fe90ab99a9bb713824059: > > > > Update version for v2.9.0-rc1 release (2017-03-21 17:13:29 +0000) > > > > are available in the git repository at: > > > > git://xenbits.xen.org/people/sstabellini/qemu-dm.git tags/xen-20170421-tag > > > > for you to fetch changes up to b0d48550a2d10f0fa8c30a7cc3ff5a1cbda8d4c4: > > > > move xen-mapcache.c to hw/i386/xen/ (2017-04-21 12:41:29 -0700) > > > > ---------------------------------------------------------------- > > Xen 2017/04/21 > > > > ---------------------------------------------------------------- > > Hi; I'm afraid this doesn't build with clang: > > > CC hw/9pfs/xen-9p-backend.o > /home/petmay01/linaro/qemu-for-merges/hw/9pfs/xen-9p-backend.c:21:1: > error: unused fun > ction 'xen_9pfs_get_ring_ptr' [-Werror,-Wunused-function] > DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs); > ^ > /home/petmay01/linaro/qemu-for-merges/include/hw/xen/io/ring.h:469:79: > note: expanded > from macro 'DEFINE_XEN_FLEX_RING_AND_INTF' > }; \ > ^ > /home/petmay01/linaro/qemu-for-merges/include/hw/xen/io/ring.h:387:30: > note: expanded from macro '\ > DEFINE_XEN_FLEX_RING' > static inline unsigned char *name##_get_ring_ptr(unsigned char *buf, \ > ^ > :151:1: note: expanded from here > xen_9pfs_get_ring_ptr > ^ > /home/petmay01/linaro/qemu-for-merges/hw/9pfs/xen-9p-backend.c:21:1: > error: unused function 'xen_9pfs_write_packet' > [-Werror,-Wunused-function] > /home/petmay01/linaro/qemu-for-merges/include/hw/xen/io/ring.h:469:79: > note: expanded from macro 'DEFINE_XEN_FLEX_RING_AND_INTF' > }; \ > ^ > /home/petmay01/linaro/qemu-for-merges/include/hw/xen/io/ring.h:412:20: > note: expanded from macro '\ > DEFINE_XEN_FLEX_RING' > static inline void name##_write_packet(unsigned char *buf, \ > ^ > :155:1: note: expanded from here > xen_9pfs_write_packet > ^ > 2 errors generated. > /home/petmay01/linaro/qemu-for-merges/rules.mak:69: recipe for target > 'hw/9pfs/xen-9p-backend.o' failed > > > Clang requires that functions, even inline functions, defined in .c files > must be used. Thank you for finding this issue. Given that ring.h is synced from Xen, I think it makes sense to leave as is. I'll fix it as follow: diff --git a/hw/9pfs/xen-9p-backend.c b/hw/9pfs/xen-9p-backend.c index 7e962aa..9c7f41a 100644 --- a/hw/9pfs/xen-9p-backend.c +++ b/hw/9pfs/xen-9p-backend.c @@ -13,12 +13,9 @@ #include "hw/hw.h" #include "hw/9pfs/9p.h" #include "hw/xen/xen_backend.h" -#include "hw/xen/io/ring.h" +#include "hw/9pfs/xen-9pfs.h" #include "qemu/config-file.h" #include "fsdev/qemu-fsdev.h" -#include - -DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs); #define VERSIONS "1" #define MAX_RINGS 8 diff --git a/hw/9pfs/xen-9pfs.h b/hw/9pfs/xen-9pfs.h new file mode 100644 index 0000000..18f0ec0 --- /dev/null +++ b/hw/9pfs/xen-9pfs.h @@ -0,0 +1,14 @@ +/* + * Xen 9p backend + * + * Copyright Aporeto 2017 + * + * Authors: + * Stefano Stabellini + * + */ + +#include +#include "hw/xen/io/ring.h" + +DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs);