diff mbox

[1/2] ioport: use INT64_MAX for IO ranges

Message ID CAAu8pHteeXzmS7SOuUhaqCbsvqW2R0v78+6nqFi6d4Rw8aA3fQ@mail.gmail.com
State New
Headers show

Commit Message

Blue Swirl March 18, 2012, 12:04 p.m. UTC
Expression UINT64_MAX + 1 will make the range bigger than
what can be represented with a 64 bit type. This would
trigger an assert in int128_get64() after the next patch.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 ioport.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

From b13b8706a5a44c1d35c0ce459cbb9fde01dc910f Mon Sep 17 00:00:00 2001
Message-Id: <b13b8706a5a44c1d35c0ce459cbb9fde01dc910f.1332072220.git.blauwirbel@gmail.com>
From: Blue Swirl <blauwirbel@gmail.com>
Date: Sat, 10 Mar 2012 16:57:10 +0000
Subject: [PATCH 1/2] ioport: use INT64_MAX for IO ranges

Expression UINT64_MAX + 1 will make the range bigger than
what can be represented with a 64 bit type. This would
trigger an assert in int128_get64() after the next patch.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 ioport.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ioport.c b/ioport.c
index 78a3b89..6e4ca0d 100644
--- a/ioport.c
+++ b/ioport.c
@@ -385,7 +385,7 @@  static void portio_list_add_1(PortioList *piolist,
      * rather than an offset relative to to start + off_low.
      */
     memory_region_init_io(region, ops, piolist->opaque, piolist->name,
-                          UINT64_MAX);
+                          INT64_MAX);
     memory_region_init_alias(alias, piolist->name,
                              region, start + off_low, off_high - off_low);
     memory_region_add_subregion(piolist->address_space,
-- 
1.7.2.5