[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 10/13] xen: remove GNUC check
From: |
marcandre . lureau |
Subject: |
[PATCH v3 10/13] xen: remove GNUC check |
Date: |
Thu, 10 Dec 2020 17:47:49 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
QEMU requires Clang or GCC, that define and support __GNUC__ extensions
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
---
include/hw/xen/interface/io/ring.h | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/include/hw/xen/interface/io/ring.h
b/include/hw/xen/interface/io/ring.h
index 5d048b335c..115705f3f4 100644
--- a/include/hw/xen/interface/io/ring.h
+++ b/include/hw/xen/interface/io/ring.h
@@ -206,21 +206,12 @@ typedef struct __name##_back_ring __name##_back_ring_t
#define RING_HAS_UNCONSUMED_RESPONSES(_r) \
((_r)->sring->rsp_prod - (_r)->rsp_cons)
-#ifdef __GNUC__
#define RING_HAS_UNCONSUMED_REQUESTS(_r) ({ \
unsigned int req = (_r)->sring->req_prod - (_r)->req_cons; \
unsigned int rsp = RING_SIZE(_r) - \
((_r)->req_cons - (_r)->rsp_prod_pvt); \
req < rsp ? req : rsp; \
})
-#else
-/* Same as above, but without the nice GCC ({ ... }) syntax. */
-#define RING_HAS_UNCONSUMED_REQUESTS(_r) \
- ((((_r)->sring->req_prod - (_r)->req_cons) < \
- (RING_SIZE(_r) - ((_r)->req_cons - (_r)->rsp_prod_pvt))) ? \
- ((_r)->sring->req_prod - (_r)->req_cons) : \
- (RING_SIZE(_r) - ((_r)->req_cons - (_r)->rsp_prod_pvt)))
-#endif
/* Direct access to individual ring elements, by index. */
#define RING_GET_REQUEST(_r, _idx) \
--
2.29.0
- Re: [PATCH v3 06/13] virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON, (continued)
[PATCH v3 09/13] poison: remove GNUC check, marcandre . lureau, 2020/12/10
[PATCH v3 10/13] xen: remove GNUC check,
marcandre . lureau <=
[PATCH v3 11/13] compiler: remove GNUC check, marcandre . lureau, 2020/12/10
[PATCH v3 12/13] linux-user: remove GNUC check, marcandre . lureau, 2020/12/10
[PATCH v3 13/13] compiler.h: remove QEMU_GNUC_PREREQ, marcandre . lureau, 2020/12/10
Re: [PATCH v3 00/13] Remove GCC < 4.8 checks, no-reply, 2020/12/10
Re: [PATCH v3 00/13] Remove GCC < 4.8 checks, Paolo Bonzini, 2020/12/14