[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/4] include/sysemu/blockdev.h: move drive_add and inline dri
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 3/4] include/sysemu/blockdev.h: move drive_add and inline drive_def |
Date: |
Wed, 24 Nov 2021 08:38:09 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 |
On 11/24/21 07:36, Emanuele Giuseppe Esposito wrote:
> drive_add is only used in softmmu/vl.c, so it can be a static
> function there, and drive_def is only a particular use case of
> qemu_opts_parse_noisily, so it can be inlined.
>
> Also remove drive_mark_claimed_by_board, as it is only defined
> but not implemented (nor used) anywhere.
>
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> ---
> include/sysemu/blockdev.h | 6 ++----
> block/monitor/block-hmp-cmds.c | 2 +-
> blockdev.c | 27 +--------------------------
> softmmu/vl.c | 25 ++++++++++++++++++++++++-
> 4 files changed, 28 insertions(+), 32 deletions(-)
>
> diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
> index 32c2d6023c..aacc587a33 100644
> --- a/include/sysemu/blockdev.h
> +++ b/include/sysemu/blockdev.h
> @@ -27,6 +27,8 @@ typedef enum {
> IF_COUNT
> } BlockInterfaceType;
>
> +extern const char *const block_if_name[];
Maybe a cleaner alternative is to ignore the previous patch,
and add a new public method:
const char *block_if_name(BlockInterfaceType iface);
- [PATCH 0/4] block: minor refactoring in preparation to the block layer API split, Emanuele Giuseppe Esposito, 2021/11/24
- [PATCH 1/4] block_int: make bdrv_backing_overridden static, Emanuele Giuseppe Esposito, 2021/11/24
- [PATCH 4/4] include/sysemu/blockdev.h: remove drive_get_max_devs, Emanuele Giuseppe Esposito, 2021/11/24
- [PATCH 2/4] include/sysemu/blockdev.h: rename if_name in block_if_name, Emanuele Giuseppe Esposito, 2021/11/24
- [PATCH 3/4] include/sysemu/blockdev.h: move drive_add and inline drive_def, Emanuele Giuseppe Esposito, 2021/11/24
- Re: [PATCH 3/4] include/sysemu/blockdev.h: move drive_add and inline drive_def,
Philippe Mathieu-Daudé <=
- Re: [PATCH 0/4] block: minor refactoring in preparation to the block layer API split, Stefan Hajnoczi, 2021/11/29