[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 1/5] vfio/quirks: Add common quirk alloc hel
From: |
Alex Williamson |
Subject: |
Re: [Qemu-devel] [RFC PATCH 1/5] vfio/quirks: Add common quirk alloc helper |
Date: |
Thu, 8 Feb 2018 11:28:36 -0700 |
On Thu, 8 Feb 2018 12:10:35 +0100
Auger Eric <address@hidden> wrote:
> Hi Alex,
> On 07/02/18 01:26, Alex Williamson wrote:
> > This will later be used to include list initialization
> >
> > Signed-off-by: Alex Williamson <address@hidden>
> > ---
> > hw/vfio/pci-quirks.c | 48
> > +++++++++++++++++++++---------------------------
> > 1 file changed, 21 insertions(+), 27 deletions(-)
> >
> > diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c
> > index e5779a7ad35b..10af23217292 100644
> > --- a/hw/vfio/pci-quirks.c
> > +++ b/hw/vfio/pci-quirks.c
> > @@ -275,6 +275,15 @@ static const MemoryRegionOps vfio_ati_3c3_quirk = {
> > .endianness = DEVICE_LITTLE_ENDIAN,
> > };
> >
> > +static VFIOQuirk *vfio_quirk_alloc(int nr_mem)
> > +{
> > + VFIOQuirk *quirk = g_malloc0(sizeof(*quirk));
> nit: Peter advised the usage of g_new0 as well for that kind of alloc.
Not my favorite interface, but good point. Updated and R-b added.
Thanks,
Alex
[Qemu-devel] [RFC PATCH 4/5] vfio: Update linux header, Alex Williamson, 2018/02/06