diff mbox series

drm/shmem: Add docbook comments for drm_gem_shmem_object madvise fields

Message ID 20191101153754.22803-1-robh@kernel.org
State Accepted
Commit 105401b659b7eb9cb42d6b5b75d5c049ad4b3dca
Headers show
Series drm/shmem: Add docbook comments for drm_gem_shmem_object madvise fields | expand

Commit Message

Rob Herring Nov. 1, 2019, 3:37 p.m. UTC
Add missing docbook comments to madvise fields in struct
drm_gem_shmem_object which fixes these warnings:

include/drm/drm_gem_shmem_helper.h:87: warning: Function parameter or member 'madv' not described in 'drm_gem_shmem_object'
include/drm/drm_gem_shmem_helper.h:87: warning: Function parameter or member 'madv_list' not described in 'drm_gem_shmem_object'

Fixes: 17acb9f35ed7 ("drm/shmem: Add madvise state and purge helpers")
Reported-by: Sean Paul <sean@poorly.run>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Rob Herring <robh@kernel.org>
---
 include/drm/drm_gem_shmem_helper.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Sean Paul Nov. 6, 2019, 5:50 p.m. UTC | #1
On Fri, Nov 01, 2019 at 10:37:54AM -0500, Rob Herring wrote:
> Add missing docbook comments to madvise fields in struct
> drm_gem_shmem_object which fixes these warnings:
> 
> include/drm/drm_gem_shmem_helper.h:87: warning: Function parameter or member 'madv' not described in 'drm_gem_shmem_object'
> include/drm/drm_gem_shmem_helper.h:87: warning: Function parameter or member 'madv_list' not described in 'drm_gem_shmem_object'
> 
> Fixes: 17acb9f35ed7 ("drm/shmem: Add madvise state and purge helpers")
> Reported-by: Sean Paul <sean@poorly.run>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>

Reviewed-by: Sean Paul <sean@poorly.run>

> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  include/drm/drm_gem_shmem_helper.h | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/include/drm/drm_gem_shmem_helper.h b/include/drm/drm_gem_shmem_helper.h
> index e2e9947b4770..901eafb09209 100644
> --- a/include/drm/drm_gem_shmem_helper.h
> +++ b/include/drm/drm_gem_shmem_helper.h
> @@ -44,7 +44,20 @@ struct drm_gem_shmem_object {
>  	 */
>  	unsigned int pages_use_count;
>  
> +	/**
> +	 * @madv: State for madvise
> +	 *
> +	 * 0 is active/inuse.
> +	 * A negative value is the object is purged.
> +	 * Positive values are driver specific and not used by the helpers.
> +	 */
>  	int madv;
> +
> +	/**
> +	 * @madv_list: List entry for madvise tracking
> +	 *
> +	 * Typically used by drivers to track purgeable objects
> +	 */
>  	struct list_head madv_list;
>  
>  	/**
> -- 
> 2.20.1
>
Daniel Vetter Nov. 21, 2019, 9:26 p.m. UTC | #2
On Fri, Nov 1, 2019 at 4:37 PM Rob Herring <robh@kernel.org> wrote:
>
> Add missing docbook comments to madvise fields in struct
> drm_gem_shmem_object which fixes these warnings:
>
> include/drm/drm_gem_shmem_helper.h:87: warning: Function parameter or member 'madv' not described in 'drm_gem_shmem_object'
> include/drm/drm_gem_shmem_helper.h:87: warning: Function parameter or member 'madv_list' not described in 'drm_gem_shmem_object'
>
> Fixes: 17acb9f35ed7 ("drm/shmem: Add madvise state and purge helpers")
> Reported-by: Sean Paul <sean@poorly.run>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Signed-off-by: Rob Herring <robh@kernel.org>

Kerneldoc for the functions you've added in 17acb9f35ed7 ("drm/shmem:
Add madvise state and purge helpers") is also missing. Can you pls fix
that too?

Thanks, Daniel

> ---
>  include/drm/drm_gem_shmem_helper.h | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/include/drm/drm_gem_shmem_helper.h b/include/drm/drm_gem_shmem_helper.h
> index e2e9947b4770..901eafb09209 100644
> --- a/include/drm/drm_gem_shmem_helper.h
> +++ b/include/drm/drm_gem_shmem_helper.h
> @@ -44,7 +44,20 @@ struct drm_gem_shmem_object {
>          */
>         unsigned int pages_use_count;
>
> +       /**
> +        * @madv: State for madvise
> +        *
> +        * 0 is active/inuse.
> +        * A negative value is the object is purged.
> +        * Positive values are driver specific and not used by the helpers.
> +        */
>         int madv;
> +
> +       /**
> +        * @madv_list: List entry for madvise tracking
> +        *
> +        * Typically used by drivers to track purgeable objects
> +        */
>         struct list_head madv_list;
>
>         /**
> --
> 2.20.1
>
diff mbox series

Patch

diff --git a/include/drm/drm_gem_shmem_helper.h b/include/drm/drm_gem_shmem_helper.h
index e2e9947b4770..901eafb09209 100644
--- a/include/drm/drm_gem_shmem_helper.h
+++ b/include/drm/drm_gem_shmem_helper.h
@@ -44,7 +44,20 @@  struct drm_gem_shmem_object {
 	 */
 	unsigned int pages_use_count;
 
+	/**
+	 * @madv: State for madvise
+	 *
+	 * 0 is active/inuse.
+	 * A negative value is the object is purged.
+	 * Positive values are driver specific and not used by the helpers.
+	 */
 	int madv;
+
+	/**
+	 * @madv_list: List entry for madvise tracking
+	 *
+	 * Typically used by drivers to track purgeable objects
+	 */
 	struct list_head madv_list;
 
 	/**