qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 4/6] hw/block: Fix the return type


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2 4/6] hw/block: Fix the return type
Date: Fri, 4 Aug 2017 13:53:13 +0100
User-agent: Mutt/1.8.3 (2017-05-23)

On Fri, Aug 04, 2017 at 06:26:41PM +0800, Mao Zhongyi wrote:
> When the function no success value to transmit, it usually make the
> function return void. It has turned out not to be a success, because
> it means that the extra local_err variable and error_propagate() will
> be needed. It leads to cumbersome code, therefore, transmit success/
> failure in the return value is worth.
> 
> So fix the return type of blkconf_apply_backend_options(),
> blkconf_geometry() and virtio_blk_data_plane_create() to avoid it.
> 
> Cc: John Snow <address@hidden>
> Cc: Kevin Wolf <address@hidden>
> Cc: Max Reitz <address@hidden>
> Cc: Stefan Hajnoczi <address@hidden>
> 
> Signed-off-by: Mao Zhongyi <address@hidden>
> ---
>  hw/block/block.c                | 15 +++++++++------
>  hw/block/dataplane/virtio-blk.c | 12 +++++++-----
>  hw/block/dataplane/virtio-blk.h |  2 +-
>  include/hw/block/block.h        |  4 ++--
>  4 files changed, 19 insertions(+), 14 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]