qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: chrisw@redhat.com, avi@redhat.com,
	Gerd Hoffmann <kraxel@redhat.com>,
	kvm@vger.kernel.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1 of 5] fix cpu_physical_memory len
Date: Fri, 12 Dec 2008 19:16:43 +0100	[thread overview]
Message-ID: <5d932ac0ac8940b042c1.1229105803@duo.random> (raw)
In-Reply-To: <patchbomb.1229105802@duo.random>

From: Andrea Arcangeli <aarcange@redhat.com>

Be consistent and have length be size_t for all methods.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---

diff --git a/cpu-all.h b/cpu-all.h
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -911,14 +911,14 @@ CPUReadMemoryFunc **cpu_get_io_memory_re
 CPUReadMemoryFunc **cpu_get_io_memory_read(int io_index);
 
 void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
-                            int len, int is_write);
+                            size_t len, int is_write);
 static inline void cpu_physical_memory_read(target_phys_addr_t addr,
-                                            uint8_t *buf, int len)
+                                            uint8_t *buf, size_t len)
 {
     cpu_physical_memory_rw(addr, buf, len, 0);
 }
 static inline void cpu_physical_memory_write(target_phys_addr_t addr,
-                                             const uint8_t *buf, int len)
+                                             const uint8_t *buf, size_t len)
 {
     cpu_physical_memory_rw(addr, (uint8_t *)buf, len, 1);
 }
@@ -936,7 +936,7 @@ void cpu_physical_memory_write_rom(targe
 void cpu_physical_memory_write_rom(target_phys_addr_t addr,
                                    const uint8_t *buf, int len);
 int cpu_memory_rw_debug(CPUState *env, target_ulong addr,
-                        uint8_t *buf, int len, int is_write);
+                        uint8_t *buf, size_t len, int is_write);
 
 #define VGA_DIRTY_FLAG       0x01
 #define CODE_DIRTY_FLAG      0x02
diff --git a/exec.c b/exec.c
--- a/exec.c
+++ b/exec.c
@@ -2839,7 +2839,7 @@ CPUReadMemoryFunc **cpu_get_io_memory_re
 /* physical memory access (slow version, mainly for debug) */
 #if defined(CONFIG_USER_ONLY)
 void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
-                            int len, int is_write)
+                            size_t len, int is_write)
 {
     int l, flags;
     target_ulong page;
@@ -2880,7 +2880,7 @@ void cpu_physical_memory_rw(target_phys_
 
 #else
 void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
-                            int len, int is_write)
+                            size_t len, int is_write)
 {
     int l, io_index;
     uint8_t *ptr;
@@ -3232,7 +3232,7 @@ void stq_phys(target_phys_addr_t addr, u
 
 /* virtual memory access for debug */
 int cpu_memory_rw_debug(CPUState *env, target_ulong addr,
-                        uint8_t *buf, int len, int is_write)
+                        uint8_t *buf, size_t len, int is_write)
 {
     int l;
     target_phys_addr_t phys_addr;

  reply	other threads:[~2008-12-12 18:18 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-12 18:16 [Qemu-devel] [PATCH 0 of 5] dma api v3 Andrea Arcangeli
2008-12-12 18:16 ` Andrea Arcangeli [this message]
2008-12-12 19:06   ` [Qemu-devel] Re: [PATCH 1 of 5] fix cpu_physical_memory len Anthony Liguori
2008-12-12 19:26     ` Andrea Arcangeli
2008-12-12 18:16 ` [Qemu-devel] [PATCH 2 of 5] add can_dma/post_dma for direct IO Andrea Arcangeli
2008-12-12 19:00   ` Blue Swirl
2008-12-12 19:18     ` Anthony Liguori
2008-12-12 20:05       ` Blue Swirl
2008-12-12 20:10         ` Anthony Liguori
2008-12-12 19:15   ` [Qemu-devel] " Anthony Liguori
2008-12-12 19:37     ` Andrea Arcangeli
2008-12-12 20:09       ` Anthony Liguori
2008-12-12 20:25       ` Gerd Hoffmann
2008-12-12 19:39     ` Anthony Liguori
2008-12-13  9:22       ` Avi Kivity
2008-12-13 16:45         ` Anthony Liguori
2008-12-13 19:48           ` Avi Kivity
2008-12-13 21:07             ` Anthony Liguori
2008-12-14  6:03               ` Avi Kivity
2008-12-14 19:10                 ` Anthony Liguori
2008-12-14 19:49                   ` Avi Kivity
2008-12-14 23:08                     ` Anthony Liguori
2008-12-15  0:57                       ` Paul Brook
2008-12-15  2:09                         ` Anthony Liguori
2008-12-15  6:23                           ` Avi Kivity
2008-12-15 18:35                       ` Blue Swirl
2008-12-15 22:06                         ` Anthony Liguori
2008-12-16  9:41                           ` Avi Kivity
2008-12-16 16:55                             ` Blue Swirl
2008-12-16 17:09                               ` Avi Kivity
2008-12-16 17:48                                 ` Anthony Liguori
2008-12-16 18:11                                   ` Blue Swirl
2008-12-16 15:57                           ` Blue Swirl
2008-12-16 16:29                             ` Paul Brook
2008-12-16 16:35                               ` Blue Swirl
2008-12-14 17:30       ` Jamie Lokier
2008-12-13 14:39     ` Andrea Arcangeli
2008-12-13 16:46       ` Anthony Liguori
2008-12-13 16:53         ` Andrea Arcangeli
2008-12-13 17:54           ` Andreas Färber
2008-12-13 21:11           ` Anthony Liguori
2008-12-14 16:47             ` Andrea Arcangeli
2008-12-14 17:01               ` Avi Kivity
2008-12-14 17:15                 ` Andrea Arcangeli
2008-12-14 19:59                   ` Avi Kivity
2008-12-22 16:44                     ` Ian Jackson
2008-12-22 19:44                       ` Avi Kivity
2008-12-23  0:03                         ` Thiemo Seufer
2008-12-23  1:02                           ` Andrea Arcangeli
2008-12-23 17:31                           ` Avi Kivity
2008-12-22 19:46                       ` Avi Kivity
2009-01-05 10:27                         ` Gerd Hoffmann
2008-12-13 22:47     ` Anthony Liguori
2008-12-14  6:07       ` Avi Kivity
2008-12-12 18:16 ` [Qemu-devel] [PATCH 3 of 5] rename dma.c to isa_dma.c Andrea Arcangeli
2008-12-12 18:16 ` [Qemu-devel] [PATCH 4 of 5] dma api Andrea Arcangeli
2008-12-12 18:55   ` Blue Swirl
2008-12-12 18:16 ` [Qemu-devel] [PATCH 5 of 5] bdrv_aio_readv/writev Andrea Arcangeli

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=5d932ac0ac8940b042c1.1229105803@duo.random \
    --to=aarcange@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=chrisw@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kvm@vger.kernel.org \
    --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).