From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qhjf3-0007lh-HY for qemu-devel@nongnu.org; Fri, 15 Jul 2011 10:46:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qhjez-0000fk-BN for qemu-devel@nongnu.org; Fri, 15 Jul 2011 10:46:37 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:37385) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qhjez-0000e0-0l for qemu-devel@nongnu.org; Fri, 15 Jul 2011 10:46:33 -0400 Received: by qwj8 with SMTP id 8so830201qwj.4 for ; Fri, 15 Jul 2011 07:46:32 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4E2052BF.6000102@redhat.com> Date: Fri, 15 Jul 2011 16:46:23 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1310740376-13323-1-git-send-email-anthony.perard@citrix.com> <1310740376-13323-3-git-send-email-anthony.perard@citrix.com> In-Reply-To: <1310740376-13323-3-git-send-email-anthony.perard@citrix.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/5] exec.c: Use ram_addr_t in cpu_physical_memory_rw(...). List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony PERARD Cc: Xen Devel , QEMU-devel , Stefano Stabellini , Alexander Graf On 07/15/2011 04:32 PM, Anthony PERARD wrote: > As the variable pd and addr1 inside the function cpu_physical_memory_rw > are mean to handle a RAM address, they should be of the ram_addr_t type > instead of unsigned long. > > Signed-off-by: Anthony PERARD > --- > exec.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/exec.c b/exec.c > index c0673c2..4220d45 100644 > --- a/exec.c > +++ b/exec.c > @@ -3858,7 +3858,7 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, > uint8_t *ptr; > uint32_t val; > target_phys_addr_t page; > - unsigned long pd; > + ram_addr_t pd; > PhysPageDesc *p; > > while (len> 0) { > @@ -3898,7 +3898,7 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, > l = 1; > } > } else { > - unsigned long addr1; > + ram_addr_t addr1; > addr1 = (pd& TARGET_PAGE_MASK) + (addr& ~TARGET_PAGE_MASK); > /* RAM case */ > ptr = qemu_get_ram_ptr(addr1); Acked-by: Paolo Bonzini Paolo