]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/core/cpu: Use size_t for memory_rw_debug len argument
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 21 Mar 2025 20:32:31 +0000 (13:32 -0700)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 31 Mar 2025 14:28:42 +0000 (16:28 +0200)
Match the prototype of cpu_memory_rw_debug().

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250325224403.4011975-4-richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
include/hw/core/cpu.h
target/sparc/cpu.h
target/sparc/mmu_helper.c

index 5d11d26556a5ea3745b5bdec5a809138bcd0be0d..abd8764e834d4a0115375891c172a3064ebc234a 100644 (file)
@@ -154,7 +154,7 @@ struct CPUClass {
 
     int (*mmu_index)(CPUState *cpu, bool ifetch);
     int (*memory_rw_debug)(CPUState *cpu, vaddr addr,
-                           uint8_t *buf, int len, bool is_write);
+                           uint8_t *buf, size_t len, bool is_write);
     void (*dump_state)(CPUState *cpu, FILE *, int flags);
     void (*query_cpu_fast)(CPUState *cpu, CpuInfoFast *value);
     int64_t (*get_arch_id)(CPUState *cpu);
index 462bcb6c0e6eb4c6295c36443531ffd118ff377d..68f8c21e7cb72a255d2fe7652b380a64b066d5a3 100644 (file)
@@ -604,7 +604,7 @@ void dump_mmu(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
 
 /* translate.c */
index 7548d01777c84e69b3deb2c731284076756541c2..3821cd91ec7ea7088d64994c77e4dc4c9dcc4446 100644 (file)
@@ -389,7 +389,7 @@ void dump_mmu(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)
 {
     CPUSPARCState *env = cpu_env(cs);
     target_ulong addr = address;