diff mbox

[v2,02/13] Use unsigned types for the 'len' argument of all memory read/write functions

Message ID 1456847859-4771-2-git-send-email-martin.galvan@tallertechnologies.com (mailing list archive)
State New, archived
Headers show

Commit Message

Martin Galvan March 1, 2016, 3:57 p.m. UTC
---
 disas/s390.c              | 3 ++-
 hw/s390x/virtio-ccw.c     | 2 +-
 target-s390x/mmu_helper.c | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

--
2.7.1

Comments

Eric Blake March 1, 2016, 4:11 p.m. UTC | #1
On 03/01/2016 08:57 AM, Martin Galvan wrote:

Missing S-o-b. Patch subject line is identical to 1/13, which is a no-no
(if I'm backporting a patch, I want the subject line to be sufficient to
determine which patch I'm backporting, and not give me 13 candidates);
please resubmit the series with distinct subject lines (adding an
appropriate prefix for each maintainer that you are targetting will help).
diff mbox

Patch

diff --git a/disas/s390.c b/disas/s390.c
index 1f167d2..fff6135 100644
--- a/disas/s390.c
+++ b/disas/s390.c
@@ -287,7 +287,8 @@  print_insn_s390 (bfd_vma memaddr, struct disassemble_info *info)
   const struct s390_opcode *opcode;
   const struct s390_opcode *opcode_end;
   unsigned int value;
-  int status, opsize, bufsize;
+  int status;
+  size_t opsize, bufsize;
   char separator;

   if (init_flag == 0)
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 74b9e2e..6fe88cd 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -427,7 +427,7 @@  static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
     VirtioCcwDevice *dev = sch->driver_data;
     VirtIODevice *vdev = virtio_ccw_get_vdev(sch);
     bool check_len;
-    int len;
+    size_t len;
     hwaddr hw_len;
     VirtioThinintInfo *thinint;

diff --git a/target-s390x/mmu_helper.c b/target-s390x/mmu_helper.c
index 5323c53..07654a1 100644
--- a/target-s390x/mmu_helper.c
+++ b/target-s390x/mmu_helper.c
@@ -422,7 +422,7 @@  static bool lowprot_enabled(const CPUS390XState *env)
  * translate_pages: Translate a set of consecutive logical page addresses
  * to absolute addresses
  */
-static int translate_pages(S390CPU *cpu, vaddr addr, int nr_pages,
+static int translate_pages(S390CPU *cpu, vaddr addr, size_t nr_pages,
                            target_ulong *pages, bool is_write)
 {
     bool lowprot = is_write && lowprot_enabled(&cpu->env);
@@ -466,7 +466,7 @@  static int translate_pages(S390CPU *cpu, vaddr addr, int nr_pages,
 int s390_cpu_virt_mem_rw(S390CPU *cpu, vaddr laddr, uint8_t ar, void *hostbuf,
                          int len, bool is_write)
 {
-    int currlen, nr_pages, i;
+    size_t currlen, nr_pages, i;
     target_ulong *pages;
     int ret;