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 <eespo...@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);