[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>
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH v2 0/6] Convert to realize and improve error handling, Mao Zhongyi, 2017/08/04
- [Qemu-devel] [PATCH v2 2/6] hw/block/fdc: Convert to realize, Mao Zhongyi, 2017/08/04
- [Qemu-devel] [PATCH v2 3/6] hw/block/nvme: Convert to realize, Mao Zhongyi, 2017/08/04
- [Qemu-devel] [PATCH v2 4/6] hw/block: Fix the return type, Mao Zhongyi, 2017/08/04
- Re: [Qemu-devel] [PATCH v2 4/6] hw/block: Fix the return type,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH v2 1/6] hw/ide: Convert DeviceClass init to realize, Mao Zhongyi, 2017/08/04
- [Qemu-devel] [PATCH v2 6/6] dev-storage: Fix the unusual function name, Mao Zhongyi, 2017/08/04
- [Qemu-devel] [PATCH v2 5/6] hw/block: Use errp directly rather than local_err, Mao Zhongyi, 2017/08/04