[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 3/4] include/sysemu/blockdev.h: move drive_add and inline
From: |
Kevin Wolf |
Subject: |
Re: [PATCH v2 3/4] include/sysemu/blockdev.h: move drive_add and inline drive_def |
Date: |
Wed, 15 Dec 2021 11:00:16 +0100 |
Am 15.12.2021 um 10:19 hat Emanuele Giuseppe Esposito geschrieben:
>
>
> On 14/12/2021 15:35, Kevin Wolf wrote:
> > Am 30.11.2021 um 10:46 hat Emanuele Giuseppe Esposito geschrieben:
> > > 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>
> >
> > I don't think moving drive_add() actually improves anything. Yes, you
> > can make it static, but in order to do that you had to introduce
> > block_if_name() as a new public function and you're moving an obviously
> > block related function to common code in vl.c.
> >
> > So this part doesn't look like a net win to me. The rest of the series
> > looks good to me.
> >
>
> So are we going to drop patch 2 and 3? For me it is fine either way, and I
> saw Stefan added r-b to all patches.
>
> If we are, Kevin are you going to apply only patch 1 and 4, or do you want
> me to send v3?
This patch does a bit more than just moving drive_add(). It also inlines
drive_def() and deletes drive_mark_claimed_by_board(), which are both
things that make sense to me. So this suggests a v3.
But if you think I should just apply patches 1 and 4, I'm happy to do
that, too.
Kevin