qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as M


From: Alex Williamson
Subject: Re: [Qemu-trivial] [PATCH 1/4] vfio: pci: make "vfio-pci-nohotplug" as MACRO
Date: Mon, 20 May 2019 14:02:21 -0600

On Mon, 20 May 2019 09:27:47 +0800
Li Qiang <address@hidden> wrote:

> Alex Williamson <address@hidden> 于2019年5月18日周六 下午10:18写道:
> 
> > On Fri, 17 May 2019 20:28:08 -0700
> > Li Qiang <address@hidden> wrote:
> >
> > Why?  (No commit message, nor cover letter)
> >
> >  
> Once I think these are trivial so no cover letter and lack some commit
> message.
> I will add some commit message in the next revision.

There is no patch that is not improved by a commit message IMO.
 
> For this patch, this is more consistent with QOMConventions:
> -->https://wiki.qemu.org/Documentation/QOMConventions  

Ok, so you're effectively just updating your previous commit
2683ccd5be8f ("vfio-pci: make vfio-pci device more QOM conventional")
which crossed in flight with b290659fc3dd ("hw/vfio/display: add ramfb
support") which added this new TypeInfo.  The QOMConventions only
recommend a TYPE_FOO if used in other parts of the code, but for
consistency I think it's reasonable (with a commit log ;).  Thanks,

Alex

> > > CC: address@hidden
> > > Signed-off-by: Li Qiang <address@hidden>
> > > ---
> > >  hw/vfio/pci.c | 6 ++++--
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
> > > index 8cecb53d5c..08729e5875 100644
> > > --- a/hw/vfio/pci.c
> > > +++ b/hw/vfio/pci.c
> > > @@ -40,6 +40,8 @@
> > >  #define TYPE_VFIO_PCI "vfio-pci"
> > >  #define PCI_VFIO(obj)    OBJECT_CHECK(VFIOPCIDevice, obj, TYPE_VFIO_PCI)
> > >
> > > +#define TYPE_VIFO_PCI_NOHOTPLUG "vfio-pci-nohotplug"
> > > +
> > >  static void vfio_disable_interrupts(VFIOPCIDevice *vdev);
> > >  static void vfio_mmap_set_enabled(VFIOPCIDevice *vdev, bool enabled);
> > >
> > > @@ -3304,8 +3306,8 @@ static void  
> > vfio_pci_nohotplug_dev_class_init(ObjectClass *klass, void *data)  
> > >  }
> > >
> > >  static const TypeInfo vfio_pci_nohotplug_dev_info = {
> > > -    .name = "vfio-pci-nohotplug",
> > > -    .parent = "vfio-pci",
> > > +    .name = TYPE_VIFO_PCI_NOHOTPLUG,
> > > +    .parent = TYPE_VFIO_PCI,
> > >      .instance_size = sizeof(VFIOPCIDevice),
> > >      .class_init = vfio_pci_nohotplug_dev_class_init,
> > >  };  
> >
> >  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]