[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PING][PATCH] Use unsigned types for the 'len' argument
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PING][PATCH] Use unsigned types for the 'len' argument of all memory read/write functions |
Date: |
Mon, 29 Feb 2016 15:59:00 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
On 29/02/2016 13:40, Martin Galvan wrote:
> When looking at address_space_read_continue I noticed the 'len' variable was
> a signed int, while it clearly should be a hwaddr or some other unsigned type.
> I started looking around and saw that this error had spread all over the code.
>
> I replaced the signed int by their unsigned counterparts as much as possible.
> If this patch goes in, I may keep working on some other type errors I saw.
>
> Signed-off-by: Martin Galvan <address@hidden>
Hi Martin,
despite the apparent simplicity, this patch is very hard to review. I
suggest splitting it in several parts so that the various submaintainers
can look at it. I can take a look at cpus.c, exec.c, kvm-all.c and
include/exec/, for example.
Please use size_t instead of hwaddr to refer to the size of a buffer in
host memory, for example address_space_rw's buf argument.
Thanks,
Paolo