From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bETPJ-0007T0-C2 for qemu-devel@nongnu.org; Sat, 18 Jun 2016 23:28:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bETPE-0001hS-AR for qemu-devel@nongnu.org; Sat, 18 Jun 2016 23:28:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bETPE-0001hO-4e for qemu-devel@nongnu.org; Sat, 18 Jun 2016 23:28:16 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C1BCF720AC for ; Sun, 19 Jun 2016 03:28:15 +0000 (UTC) Date: Sun, 19 Jun 2016 06:28:11 +0300 From: "Michael S. Tsirkin" Message-ID: <20160619062757-mutt-send-email-mst@redhat.com> References: <1466023310-13221-1-git-send-email-armbru@redhat.com> <1466023310-13221-4-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1466023310-13221-4-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [PATCH RFC 3/4] range: Drop the previous commit's trickery List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, eblake@redhat.com, pbonzini@redhat.com On Wed, Jun 15, 2016 at 10:41:49PM +0200, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster Agree with Eric about squashing this. Reviewed-by: Michael S. Tsirkin > --- > include/qemu/range.h | 21 --------------------- > util/range.c | 1 - > 2 files changed, 22 deletions(-) > > diff --git a/include/qemu/range.h b/include/qemu/range.h > index 9296ba0..c8c46a9 100644 > --- a/include/qemu/range.h > +++ b/include/qemu/range.h > @@ -30,16 +30,6 @@ > * - this can not represent a full 0 to ~0x0LL range. > */ > > -bool range_is_empty(Range *range); > -bool range_contains(Range *range, uint64_t val); > -void range_make_empty(Range *range); > -void range_set_bounds(Range *range, uint64_t lob, uint64_t upb); > -void range_set_bounds1(Range *range, uint64_t lob, uint64_t upb_plus1); > -uint64_t range_lob(Range *range); > -uint64_t range_upb(Range *range); > -void range_extend(Range *range, Range *extend_by); > -#ifdef RANGE_IMPL > - > /* A structure representing a range of addresses. */ > struct Range { > uint64_t begin; /* First byte of the range, or 0 if empty. */ > @@ -52,9 +42,6 @@ static inline void range_invariant(Range *range) > || range->begin <= range->end - 1); /* non-empty */ > } > > -#define static > -#define inline > - > /* Compound literal encoding the empty range */ > #define range_empty ((Range){ .begin = 0, .end = 0 }) > > @@ -148,14 +135,6 @@ static inline void range_extend(Range *range, Range *extend_by) > assert(!range_is_empty(range)); > } > > -#undef static > -#undef inline > -#else > -struct Range { > - uint64_t begin_, end_; > -}; > -#endif > - > /* Get last byte of a range from offset + length. > * Undefined for ranges that wrap around 0. */ > static inline uint64_t range_get_last(uint64_t offset, uint64_t len) > diff --git a/util/range.c b/util/range.c > index ab5102a..ca149a0 100644 > --- a/util/range.c > +++ b/util/range.c > @@ -19,7 +19,6 @@ > */ > > #include "qemu/osdep.h" > -#define RANGE_IMPL > #include "qemu/range.h" > > /* > -- > 2.5.5