[Qemu-devel] [PATCH 03/27] libvhost-user: improve vu_queue_pop() doc

Marc-André Lureau posted 27 patches 8 years, 5 months ago
There is a newer version of this series
[Qemu-devel] [PATCH 03/27] libvhost-user: improve vu_queue_pop() doc
Posted by Marc-André Lureau 8 years, 5 months ago
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 contrib/libvhost-user/libvhost-user.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h
index 53ef222c0b..9b9b00e191 100644
--- a/contrib/libvhost-user/libvhost-user.h
+++ b/contrib/libvhost-user/libvhost-user.h
@@ -351,7 +351,8 @@ void vu_queue_notify(VuDev *dev, VuVirtq *vq);
  * @vq: a VuVirtq queue
  * @sz: the size of struct to return (must be >= VuVirtqElement)
  *
- * Returns: a VuVirtqElement filled from the queue or NULL.
+ * Returns: a VuVirtqElement filled from the queue or NULL. The
+ * returned element must be free() by the caller.
  */
 void *vu_queue_pop(VuDev *dev, VuVirtq *vq, size_t sz);
 
-- 
2.14.1.146.gd35faa819


Re: [Qemu-devel] [PATCH 03/27] libvhost-user: improve vu_queue_pop() doc
Posted by Paolo Bonzini 8 years, 4 months ago
On 23/08/2017 18:19, Marc-André Lureau wrote:
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  contrib/libvhost-user/libvhost-user.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h
> index 53ef222c0b..9b9b00e191 100644
> --- a/contrib/libvhost-user/libvhost-user.h
> +++ b/contrib/libvhost-user/libvhost-user.h
> @@ -351,7 +351,8 @@ void vu_queue_notify(VuDev *dev, VuVirtq *vq);
>   * @vq: a VuVirtq queue
>   * @sz: the size of struct to return (must be >= VuVirtqElement)
>   *
> - * Returns: a VuVirtqElement filled from the queue or NULL.
> + * Returns: a VuVirtqElement filled from the queue or NULL. The
> + * returned element must be free() by the caller.

Maybe free()-d or freed.

Otherwise

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

>   */
>  void *vu_queue_pop(VuDev *dev, VuVirtq *vq, size_t sz);
>  
> 


Re: [Qemu-devel] [PATCH 03/27] libvhost-user: improve vu_queue_pop() doc
Posted by Eric Blake 8 years, 4 months ago
On 09/19/2017 08:43 AM, Paolo Bonzini wrote:
> On 23/08/2017 18:19, Marc-André Lureau wrote:
>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>>  contrib/libvhost-user/libvhost-user.h | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h
>> index 53ef222c0b..9b9b00e191 100644
>> --- a/contrib/libvhost-user/libvhost-user.h
>> +++ b/contrib/libvhost-user/libvhost-user.h
>> @@ -351,7 +351,8 @@ void vu_queue_notify(VuDev *dev, VuVirtq *vq);
>>   * @vq: a VuVirtq queue
>>   * @sz: the size of struct to return (must be >= VuVirtqElement)
>>   *
>> - * Returns: a VuVirtqElement filled from the queue or NULL.
>> + * Returns: a VuVirtqElement filled from the queue or NULL. The
>> + * returned element must be free() by the caller.
> 
> Maybe free()-d or freed.

Is it actually free(), or g_free()?

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH 03/27] libvhost-user: improve vu_queue_pop() doc
Posted by Marc-André Lureau 8 years, 4 months ago
Hi

----- Original Message -----
> On 09/19/2017 08:43 AM, Paolo Bonzini wrote:
> > On 23/08/2017 18:19, Marc-André Lureau wrote:
> >> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> >> ---
> >>  contrib/libvhost-user/libvhost-user.h | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/contrib/libvhost-user/libvhost-user.h
> >> b/contrib/libvhost-user/libvhost-user.h
> >> index 53ef222c0b..9b9b00e191 100644
> >> --- a/contrib/libvhost-user/libvhost-user.h
> >> +++ b/contrib/libvhost-user/libvhost-user.h
> >> @@ -351,7 +351,8 @@ void vu_queue_notify(VuDev *dev, VuVirtq *vq);
> >>   * @vq: a VuVirtq queue
> >>   * @sz: the size of struct to return (must be >= VuVirtqElement)
> >>   *
> >> - * Returns: a VuVirtqElement filled from the queue or NULL.
> >> + * Returns: a VuVirtqElement filled from the queue or NULL. The
> >> + * returned element must be free() by the caller.
> > 
> > Maybe free()-d or freed.
> 
> Is it actually free(), or g_free()?

free(), libvhost-user itself is free of glib, and mostly of qemu headers.