2021-06-03 09:24:49

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the amdgpu tree

Hi all,

After merging the amdgpu tree, today's linux-next build (htmldocs)
produced this warning:

include/drm/drm_atomic.h:908: warning: Function parameter or member '__state' not described in 'for_each_new_plane_in_state_reverse'
include/drm/drm_atomic.h:908: warning: Function parameter or member 'plane' not described in 'for_each_new_plane_in_state_reverse'
include/drm/drm_atomic.h:908: warning: Function parameter or member 'new_plane_state' not described in 'for_each_new_plane_in_state_reverse'
include/drm/drm_atomic.h:908: warning: Function parameter or member '__i' not described in 'for_each_new_plane_in_state_reverse'

Introduced by commit

a6c3c37b661d ("drm/amd/display: fix gcc set but not used warning of variable 'old_plane_state'")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-06-03 11:24:18

by Yu Kuai

[permalink] [raw]
Subject: [PATCH] drm: fix doc warnings in drm_atomic.h

Add description for parameters for
for_each_new_plane_in_state_reverse to fix warnings:

include/drm/drm_atomic.h:908: warning: Function parameter or member '__state' not described in 'for_each_new_plane_in_state_reverse'
include/drm/drm_atomic.h:908: warning: Function parameter or member 'plane' not described in 'for_each_new_plane_in_state_reverse'
include/drm/drm_atomic.h:908: warning: Function parameter or member 'new_plane_state' not described in 'for_each_new_plane_in_state_reverse'
include/drm/drm_atomic.h:908: warning: Function parameter or member '__i' not described in 'for_each_new_plane_in_state_reverse'

Fixes: a6c3c37b661d ("drm/amd/display: fix gcc set but not used warning of variable 'old_plane_state'")
Signed-off-by: Yu Kuai <[email protected]>
---
include/drm/drm_atomic.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 8f1350e599eb..1701c2128a5c 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -898,6 +898,10 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
/**
* for_each_new_plane_in_state_reverse - other than only tracking new state,
* it's the same as for_each_oldnew_plane_in_state_reverse
+ * @__state: &struct drm_atomic_state pointer
+ * @plane: &struct drm_plane iteration cursor
+ * @new_plane_state: &struct drm_plane_state iteration cursor for the new state
+ * @__i: int iteration cursor, for macro-internal use
*/
#define for_each_new_plane_in_state_reverse(__state, plane, new_plane_state, __i) \
for ((__i) = ((__state)->dev->mode_config.num_total_plane - 1); \
--
2.31.1

2021-06-03 19:19:41

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH] drm: fix doc warnings in drm_atomic.h

Applied. Thanks!

Alex

On Thu, Jun 3, 2021 at 7:21 AM Yu Kuai <[email protected]> wrote:
>
> Add description for parameters for
> for_each_new_plane_in_state_reverse to fix warnings:
>
> include/drm/drm_atomic.h:908: warning: Function parameter or member '__state' not described in 'for_each_new_plane_in_state_reverse'
> include/drm/drm_atomic.h:908: warning: Function parameter or member 'plane' not described in 'for_each_new_plane_in_state_reverse'
> include/drm/drm_atomic.h:908: warning: Function parameter or member 'new_plane_state' not described in 'for_each_new_plane_in_state_reverse'
> include/drm/drm_atomic.h:908: warning: Function parameter or member '__i' not described in 'for_each_new_plane_in_state_reverse'
>
> Fixes: a6c3c37b661d ("drm/amd/display: fix gcc set but not used warning of variable 'old_plane_state'")
> Signed-off-by: Yu Kuai <[email protected]>
> ---
> include/drm/drm_atomic.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
> index 8f1350e599eb..1701c2128a5c 100644
> --- a/include/drm/drm_atomic.h
> +++ b/include/drm/drm_atomic.h
> @@ -898,6 +898,10 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
> /**
> * for_each_new_plane_in_state_reverse - other than only tracking new state,
> * it's the same as for_each_oldnew_plane_in_state_reverse
> + * @__state: &struct drm_atomic_state pointer
> + * @plane: &struct drm_plane iteration cursor
> + * @new_plane_state: &struct drm_plane_state iteration cursor for the new state
> + * @__i: int iteration cursor, for macro-internal use
> */
> #define for_each_new_plane_in_state_reverse(__state, plane, new_plane_state, __i) \
> for ((__i) = ((__state)->dev->mode_config.num_total_plane - 1); \
> --
> 2.31.1
>