[libvirt] [PATCH] pci: Use virPCIDeviceAddress in virPCIDevice

Andrea Bolognani abologna at redhat.com
Tue Dec 15 07:57:46 UTC 2015


On Mon, 2015-12-14 at 14:46 -0500, Laine Stump wrote:
> On 12/14/2015 09:42 AM, Andrea Bolognani wrote:
> > Instead of replicating the information (domain, bus, slot, function)
> > inside the virPCIDevice structure, use the already-existing
> > virPCIDeviceAddress structure.
> 
> You use virPCIDeviceAddressPtr rather than virPCIDeviceAddress,
> resulting in an extra bit of memory to malloc, and an extra indirection
> when the members are accessed. Was there a particular reason for that? I
> had figured the domain/bus/slot/function would just be replaced by a
> plain virPCIDeviceAddress rather than a pointer to one...

No real reason. I'll change it to a plain virPCIDeviceAddress.

Cheers.

-- 
Andrea Bolognani
Software Engineer - Virtualization Team




More information about the libvir-list mailing list