From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: eblake@redhat.com, mst@redhat.com, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH RFC 3/4] range: Drop the previous commit's trickery
Date: Wed, 15 Jun 2016 22:41:49 +0200 [thread overview]
Message-ID: <1466023310-13221-4-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1466023310-13221-1-git-send-email-armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
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
next prev parent reply other threads:[~2016-06-15 20:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-15 20:41 [Qemu-devel] [PATCH RFC 0/4] range: Make it simpler & safer Markus Armbruster
2016-06-15 20:41 ` [Qemu-devel] [PATCH RFC 1/4] log: Clean up misuse of Range for -dfilter Markus Armbruster
2016-06-15 23:30 ` Eric Blake
2016-06-19 3:24 ` Michael S. Tsirkin
2016-06-15 20:41 ` [Qemu-devel] [PATCH RFC 2/4] range: Eliminate direct Range member access Markus Armbruster
2016-06-15 23:50 ` Eric Blake
2016-06-16 7:50 ` Markus Armbruster
2016-06-19 3:25 ` Michael S. Tsirkin
2016-06-20 7:26 ` Markus Armbruster
2016-06-15 20:41 ` Markus Armbruster [this message]
2016-06-15 23:53 ` [Qemu-devel] [PATCH RFC 3/4] range: Drop the previous commit's trickery Eric Blake
2016-06-19 3:28 ` Michael S. Tsirkin
2016-06-20 7:28 ` Markus Armbruster
2016-06-15 20:41 ` [Qemu-devel] [PATCH RFC 4/4] range: Replace internal representation of Range Markus Armbruster
2016-06-15 23:57 ` Eric Blake
2016-06-16 8:04 ` Markus Armbruster
2016-06-19 3:24 ` Michael S. Tsirkin
2016-06-20 7:33 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1466023310-13221-4-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).