From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Thibault Subject: [PATCH] ioemu: fix phys_ram_addr parameter usage Date: Wed, 23 Jan 2008 17:15:25 +0000 Message-ID: <20080123171525.GG5188@implementation.uk.xensource.com> References: <20080123155159.GC5188@implementation.uk.xensource.com> <20080123163844.GL4252@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20080123163844.GL4252@implementation.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org ioemu: fix phys_ram_addr parameter usage Signed-off-by: Samuel Thibault diff -r c364f80eb4b5 tools/ioemu/target-i386-dm/exec-dm.c --- a/tools/ioemu/target-i386-dm/exec-dm.c Wed Jan 23 13:27:21 2008 +0000 +++ b/tools/ioemu/target-i386-dm/exec-dm.c Wed Jan 23 17:11:15 2008 +0000 @@ -414,7 +414,7 @@ int iomem_index(target_phys_addr_t addr) #if defined(__i386__) || defined(__x86_64__) #define phys_ram_addr(x) (qemu_map_cache(x)) #elif defined(__ia64__) -#define phys_ram_addr(x) ((addr < ram_size) ? (phys_ram_base + (x)) : NULL) +#define phys_ram_addr(x) (((x) < ram_size) ? (phys_ram_base + (x)) : NULL) #endif extern unsigned long *logdirty_bitmap;