[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH 1/2] virtio-blk: Remove useless condition around

From: Stefan Hajnoczi
Subject: Re: [Qemu-block] [PATCH 1/2] virtio-blk: Remove useless condition around g_free()
Date: Mon, 13 Feb 2017 14:27:24 +0000
User-agent: Mutt/1.7.1 (2016-10-04)

On Tue, Feb 07, 2017 at 09:27:22PM +0800, Fam Zheng wrote:
> Laszlo spotted and studied this wasteful "if". He pointed out:
> The original virtio_blk_free_request needed an "if" as it accesses one
> field, since 671ec3f05655 ("virtio-blk: Convert VirtIOBlockReq.elem to
> pointer", 2014-06-11); later on in f897bf751fbd ("virtio-blk: embed
> VirtQueueElement in VirtIOBlockReq", 2014-07-09) the field became
> embedded, so the "if" became unnecessary (at which point we were using
> g_slice_free(), but it is the same.
> Now drop it.
> Reported-by: Laszlo Ersek <address@hidden>
> Signed-off-by: Fam Zheng <address@hidden>
> ---
>  hw/block/virtio-blk.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Stefan Hajnoczi <address@hidden>

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]