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

Re: [libvirt] [PATCH v2 07/25] conf: Add virDomainDeviceSetData



On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote:
[...]
> +/**
> + * virDomainDeviceSetData
> + * @device: virDomainDeviceDefPtr with ->type filled in
> + * @data: *DefPtr data for a device. Ex: virDomainDiskDefPtr
> + *
> + * Set the data.X variable for the device->type value. Basically
> + * a mapping of virDomainDeviceType to the associated name in
> + * the virDomainDeviceDef union
> + */
> +void
> +virDomainDeviceSetData(virDomainDeviceDefPtr device,
> +                       void *devicedata)

Documentation doesn't match signature: use either 'devicedata'
or 'data' in both cases. I personally prefer the latter, but either
one is fine :)

Additionally, please move both the implementation...

[...]
> @@ -2937,6 +2937,9 @@ virDomainDeviceDefPtr virDomainDeviceDefCopy(virDomainDeviceDefPtr src,
>  virDomainDeviceInfoPtr virDomainDeviceGetInfo(virDomainDeviceDefPtr device);
>  void virDomainTPMDefFree(virDomainTPMDefPtr def);
>  
> +void virDomainDeviceSetData(virDomainDeviceDefPtr device,
> +                            void *devicedata);
> +

... and the declaration right after virDomainDeviceGetInfo(), as
they're very closely related.

With the above addressed,

  Reviewed-by: Andrea Bolognani <abologna redhat com>

-- 
Andrea Bolognani / Red Hat / Virtualization


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