From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VL7zK-0004IX-Mg for qemu-devel@nongnu.org; Sun, 15 Sep 2013 04:47:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VL7zE-0003pl-OR for qemu-devel@nongnu.org; Sun, 15 Sep 2013 04:47:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VL7zE-0003oZ-Eq for qemu-devel@nongnu.org; Sun, 15 Sep 2013 04:47:20 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8F8lJxP029278 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 15 Sep 2013 04:47:19 -0400 Date: Sun, 15 Sep 2013 11:49:29 +0300 From: "Michael S. Tsirkin" Message-ID: <20130915084929.GA31654@redhat.com> References: <1379234759-31527-1-git-send-email-mst@redhat.com> <1379234759-31527-4-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1379234759-31527-4-git-send-email-mst@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 3/6] range: add min/max operations on ranges List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: imammedo@redhat.com On Sun, Sep 15, 2013 at 11:46:44AM +0300, Michael S. Tsirkin wrote: > Signed-off-by: Michael S. Tsirkin Actually I applied the following on top - not going to repost as that just adds a comment. diff --git a/include/qemu/range.h b/include/qemu/range.h index 1c688ca..aae9720 100644 --- a/include/qemu/range.h +++ b/include/qemu/range.h @@ -29,6 +29,7 @@ static inline void range_extend(Range *range, Range *extend_by) if (range->begin > extend_by->begin) { range->begin = extend_by->begin; } + /* Compare last byte in case region ends at ~0x0LL */ if (range->end - 1 < extend_by->end - 1) { range->end = extend_by->end; }