On 2015/11/10 17:56, Stefan Hajnoczi wrote:
> The C99 standard says:
>
> 6.3.1.1 Boolean, characters, and integers
>
> - The rank of a signed integer type shall be greater than the rank of
> any signed integer type with less precision.
>
> ...
>
> - The rank of any unsigned integer type shall
On Tue, Nov 10, 2015 at 02:35:19PM +0800, Gonglei wrote:
> On 2015/11/9 21:57, Stefan Hajnoczi wrote:
> > On Mon, Nov 09, 2015 at 05:03:30PM +0800, arei.gong...@huawei.com wrote:
> >> From: Gonglei
> >>
> >> 1. avoid possible superflous checking
> >> 2. make code more robustness
> >>
> >> Signed-o
On 10/11/2015 07:35, Gonglei wrote:
>> > nb_sectors - int
>> > max_xfer_len - int
>> > req->qiov.size - size_t
>> > BDRV_SECTOR_SIZE - unsigned long long
>> >
>> > Therefore this expression is an int > unsigned long long comparison.
>> >
> Sorry, I'm confused.
> max_xfer_len is int,
> "req->qio
On 2015/11/9 21:57, Stefan Hajnoczi wrote:
> On Mon, Nov 09, 2015 at 05:03:30PM +0800, arei.gong...@huawei.com wrote:
>> From: Gonglei
>>
>> 1. avoid possible superflous checking
>> 2. make code more robustness
>>
>> Signed-off-by: Gonglei
>> Reviewed-by: Fam Zheng
>> ---
>> v3: change the third
On Mon, Nov 09, 2015 at 05:03:30PM +0800, arei.gong...@huawei.com wrote:
> From: Gonglei
>
> 1. avoid possible superflous checking
> 2. make code more robustness
>
> Signed-off-by: Gonglei
> Reviewed-by: Fam Zheng
> ---
> v3: change the third condition too [Paolo]
> add Fam's R-by
> ---
>
On 09/11/2015 10:03, arei.gong...@huawei.com wrote:
> From: Gonglei
>
> 1. avoid possible superflous checking
> 2. make code more robustness
>
> Signed-off-by: Gonglei
> Reviewed-by: Fam Zheng
> ---
> v3: change the third condition too [Paolo]
> add Fam's R-by
> ---
> hw/block/virtio-bl
From: Gonglei
1. avoid possible superflous checking
2. make code more robustness
Signed-off-by: Gonglei
Reviewed-by: Fam Zheng
---
v3: change the third condition too [Paolo]
add Fam's R-by
---
hw/block/virtio-blk.c | 27 +--
1 file changed, 9 insertions(+), 18 dele