[libvirt] [PATCH v2 7/8] qemu: hotplug: Drop !QEMU_CAPS_DEVICE code

Cole Robinson crobinso at redhat.com
Thu Jan 28 21:21:55 UTC 2016


On 01/26/2016 11:44 AM, Laine Stump wrote:
> On 01/22/2016 02:11 PM, Cole Robinson wrote:
>> On 01/22/2016 02:09 PM, Cole Robinson wrote:
>>> Nowadays we only support qemu 0.12.0+ which provides QEMU_CAPS_DEVICE,
>>> so this is all dead code.
>>> ---
>>>   src/qemu/qemu_hotplug.c | 480
>>> +++++++++++++++---------------------------------
>>>   1 file changed, 144 insertions(+), 336 deletions(-)
>>>
>> git show -w attached
>>
> 
> Just nitpicking, but seeing it this way allowed me to randomly notice that the
> changes have created several instances of code like this:
> 
>     if (!detach->info.alias) {
>         if (qemuAssignDeviceControllerAlias(vm->def, priv->qemuCaps, detach) < 0)
>             goto cleanup;
>     }
> 
> Maybe combine those like this:
> 
>     if (!detach->info.alias &&
>         (qemuAssignDeviceControllerAlias(vm->def, priv->qemuCaps, detach) < 0))
>         goto cleanup;
> 
> 
> 

Thanks, fixed locally. It will be in v2 whenever I get around to posting it.

Thanks,
Cole




More information about the libvir-list mailing list