Re: [PATCH 3/6] qemu_driver: use VIR_AUTOUNREF() with virQEMUDriverConfigPtr 3/3

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

 



On Thu, Sep 26, 2019 at 01:15:16PM -0300, Daniel Henrique Barboza wrote:
>
>
> On 9/26/19 6:18 AM, Erik Skultety wrote:
> > On Wed, Sep 18, 2019 at 11:56:55AM -0300, Daniel Henrique Barboza wrote:
> > > virQEMUDriverConfigPtr can be auto-unref for the great majority
> > > of the uses made in qemu_driver, sparing us a virObjectUnref()
> > > call and sometimes a whole 'cleanup' label.
> > >
> > > This patch changes virQEMUDriverConfigPtr declarations to
> > > use VIR_AUTOUNREF(). 'cleanup' labels were deleted when
> > > applicable.
> > >
> > > This is the last part of this change. All but one* instance of
> > > virQEMUDriverConfigPtr were changed to use VIR_AUTOUNREF().
> > > 'cleanup' labels were deleted when applicable.
> > >
> > > * qemuStateInitialize: we can't auto-unref the pointer since we're
> > > initializing the qemu_driver object with it.
> > >
> > > Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
> > > ---
> > I know you focused on virQEMUDriverConfigPtr primarily, but since you're
> > following up with VIR_AUTOFREE and touching qemu_driver only, I'd like to do a
> > better job and use VIR_AUTOUNREF at many more places across the file for:
> >
> > virCapsPtr caps
> > virConnectPtr conn
> > qemuDomainSaveCookiePtr cookie
> > virQEMUCapsPtr qemuCaps
> > qemuBlockJobDataPtr job
> > virDomainCapsPtr domCaps
> > virNetworkPtr network
>
> No problem. Should I squash the first 3 patches of this series into a single

I would have squashed those 3 into a single one before pushing anyway.

> one that will touch only virQEMUDriverConfigPtr and then make one patch
> for each pointer type that's changed?

Ultimately I'd have all the VIR_AUTOUNREF changes touching the same file in a
single patch, but for review purposes it may be even better to have them split
in order to separate the changes I've already reviewed and the ones you'll
introduce.

Erik

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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