From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aamgk-0007QL-Bm for qemu-devel@nongnu.org; Tue, 01 Mar 2016 10:58:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aamgj-0006Rn-DG for qemu-devel@nongnu.org; Tue, 01 Mar 2016 10:58:18 -0500 Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]:33450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aamgj-0006Rg-8P for qemu-devel@nongnu.org; Tue, 01 Mar 2016 10:58:17 -0500 Received: by mail-qk0-x235.google.com with SMTP id s5so70768745qkd.0 for ; Tue, 01 Mar 2016 07:58:17 -0800 (PST) From: Martin Galvan Date: Tue, 1 Mar 2016 12:57:38 -0300 Message-Id: <1456847859-4771-12-git-send-email-martin.galvan@tallertechnologies.com> In-Reply-To: <1456847859-4771-1-git-send-email-martin.galvan@tallertechnologies.com> References: <1456847650-4476-1-git-send-email-martin.galvan@tallertechnologies.com> <1456847859-4771-1-git-send-email-martin.galvan@tallertechnologies.com> Subject: [Qemu-devel] [PATCH v2 12/13] Use unsigned types for the 'len' argument of all memory read/write functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, peter.maydell@linaro.org, pbonzini@redhat.com, edgar.iglesias@gmail.com, rth@twiddle.net, aurelien@aurel32.net, kraxel@redhat.com, blauwirbel@gmail.com, lcapitulino@redhat.com, armbru@redhat.com, afaerber@suse.de, dmitry@daynix.com --- include/hw/sparc/sun4m.h | 6 +++--- target-sparc/cpu.h | 2 +- target-sparc/mmu_helper.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/hw/sparc/sun4m.h b/include/hw/sparc/sun4m.h index 9c17425..fe0de1e 100644 --- a/include/hw/sparc/sun4m.h +++ b/include/hw/sparc/sun4m.h @@ -9,17 +9,17 @@ /* iommu.c */ void sparc_iommu_memory_rw(void *opaque, hwaddr addr, - uint8_t *buf, int len, int is_write); + uint8_t *buf, size_t len, int is_write); static inline void sparc_iommu_memory_read(void *opaque, hwaddr addr, - uint8_t *buf, int len) + uint8_t *buf, size_t len) { sparc_iommu_memory_rw(opaque, addr, buf, len, 0); } static inline void sparc_iommu_memory_write(void *opaque, hwaddr addr, - uint8_t *buf, int len) + uint8_t *buf, size_t len) { sparc_iommu_memory_rw(opaque, addr, buf, len, 1); } diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index dc46122..49c458c 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -521,7 +521,7 @@ void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUSPARCState *env); #if !defined(TARGET_SPARC64) && !defined(CONFIG_USER_ONLY) int sparc_cpu_memory_rw_debug(CPUState *cpu, vaddr addr, - uint8_t *buf, int len, bool is_write); + uint8_t *buf, size_t len, bool is_write); #endif diff --git a/target-sparc/mmu_helper.c b/target-sparc/mmu_helper.c index aa80c48..ac95f85 100644 --- a/target-sparc/mmu_helper.c +++ b/target-sparc/mmu_helper.c @@ -358,13 +358,13 @@ void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUSPARCState *env) * that the sparc ABI is followed. */ int sparc_cpu_memory_rw_debug(CPUState *cs, vaddr address, - uint8_t *buf, int len, bool is_write) + uint8_t *buf, size_t len, bool is_write) { SPARCCPU *cpu = SPARC_CPU(cs); CPUSPARCState *env = &cpu->env; target_ulong addr = address; - int i; - int len1; + size_t i; + size_t len1; int cwp = env->cwp; if (!is_write) { -- 2.7.1