Re: [PATCH 13/33] qemu: Drop qemuDomainSetSCSIControllerModel()

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

 



On Thu, Jan 25, 2024 at 11:15:14 +0100, Peter Krempa wrote:
> On Wed, Jan 24, 2024 at 20:37:33 +0100, Andrea Bolognani wrote:
> > It only has a single caller.
> > 
> > Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> > ---
> >  src/qemu/qemu_domain.c         |  4 +++-
> >  src/qemu/qemu_domain_address.c | 25 -------------------------
> >  src/qemu/qemu_domain_address.h |  4 ----
> >  3 files changed, 3 insertions(+), 30 deletions(-)
> > 
> > diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> > index 9289c1fa18..48d721a809 100644
> > --- a/src/qemu/qemu_domain.c
> > +++ b/src/qemu/qemu_domain.c
> > @@ -5584,7 +5584,9 @@ qemuDomainControllerDefPostParse(virDomainControllerDef *cont,
> >      switch (cont->type) {
> >      case VIR_DOMAIN_CONTROLLER_TYPE_SCSI:
> >          /* Set the default SCSI controller model if not already set */
> > -        if (qemuDomainSetSCSIControllerModel(def, cont, qemuCaps) < 0)
> > +        cont->model = qemuDomainGetSCSIControllerModel(def, cont, qemuCaps);
> > +
> > +        if (cont->model < 0)
> >              return -1;
> 
> This is not future proof for the case when 'model' gets turned into a
> proper enum.

Based on further patches, it seems to be a problem in more places.

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux