lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30a9222e-30fc-8dfb-312e-05367785ff6a@redhat.com>
Date:   Thu, 15 Jul 2021 16:10:54 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Xie Yongji <xieyongji@...edance.com>, mst@...hat.com,
        dan.carpenter@...cle.com
Cc:     virtualization@...ts.linux-foundation.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] vdpa: Add documentation for vdpa_alloc_device() macro


在 2021/7/15 下午4:00, Xie Yongji 写道:
> The return value of vdpa_alloc_device() macro is not very
> clear, so that most of callers did the wrong check. Let's
> add some comments to better document it.
>
> Signed-off-by: Xie Yongji <xieyongji@...edance.com>


Acked-by: Jason Wang <jasowang@...hat.com>


> ---
>   include/linux/vdpa.h | 11 +++++++++++
>   1 file changed, 11 insertions(+)
>
> diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
> index 3357ac98878d..8cfe49d201dd 100644
> --- a/include/linux/vdpa.h
> +++ b/include/linux/vdpa.h
> @@ -277,6 +277,17 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent,
>   					const struct vdpa_config_ops *config,
>   					size_t size, const char *name);
>   
> +/**
> + * vdpa_alloc_device - allocate and initilaize a vDPA device
> + *
> + * @dev_struct: the type of the parent structure
> + * @member: the name of struct vdpa_device within the @dev_struct
> + * @parent: the parent device
> + * @config: the bus operations that is supported by this device
> + * @name: name of the vdpa device
> + *
> + * Return allocated data structure or ERR_PTR upon error
> + */
>   #define vdpa_alloc_device(dev_struct, member, parent, config, name)   \
>   			  container_of(__vdpa_alloc_device( \
>   				       parent, config, \

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ