* [PATCH] drm/amd/display: Document the return values of the dc_update_state helpers
@ 2026-11-21 6:15 TAKANO Mitsuhiro
2026-12-04 19:01 ` George Zhang
0 siblings, 1 reply; 2+ messages in thread
From: TAKANO Mitsuhiro @ 2026-11-21 6:15 UTC (permalink / raw)
To: amd-gfx, Harry Wentland, Leo Li, Alex Deucher
Cc: Rodrigo Siqueira, Christian König, David Airlie,
Simona Vetter, dri-devel, linux-kernel, TAKANO Mitsuhiro
kernel-doc -Wall reports:
dc.h:2175 No description found for return value of
'dc_update_state_prepare'
dc.h:2190 No description found for return value of
'dc_update_state_cleanup'
Both functions return bool and their comments explain in prose what the
caller must do next, but neither has a Return: section, so kernel-doc
asks for one. Move the explanation into a Return: section and say when
the scratch slot is released.
No functional change.
Written with Hermes Agent, an LLM assistant; the author reviewed it and
ran kernel-doc on the file with and without the change.
Signed-off-by: TAKANO Mitsuhiro <takano32@gmail.com>
---
drivers/gpu/drm/amd/display/dc/dc.h | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index d3c484f45333..231a8ca2b18a 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -2170,8 +2170,8 @@ struct dc_update_scratch_space *dc_update_state_init(
* dc_update_state_prepare - Prepare the commit under the global lock.
* @scratch: commit scratch from dc_update_state_init()
*
- * On failure the scratch slot is released and false is returned; the caller
- * must not call execute or cleanup.
+ * Return: true on success, false on failure. On failure the scratch slot has
+ * already been released, so the caller must not call execute or cleanup.
*/
bool dc_update_state_prepare(struct dc_update_scratch_space *scratch);
@@ -2185,8 +2185,11 @@ void dc_update_state_execute(const struct dc_update_scratch_space *scratch);
* dc_update_state_cleanup - Finalise the commit and release the scratch slot.
* @scratch: commit scratch from dc_update_state_init()
*
- * Must be called with the global lock held. Returns true if the caller must
- * loop back to prepare (SEAMLESS continuation).
+ * Must be called with the global lock held.
+ *
+ * Return: true if the caller must loop back to prepare (SEAMLESS
+ * continuation), false otherwise; the scratch slot is released before false
+ * is returned.
*/
bool dc_update_state_cleanup(struct dc_update_scratch_space *scratch);
base-commit: d0f871bfb831705d9f55479f5b2b40f636ea7b16
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amd/display: Document the return values of the dc_update_state helpers
2026-11-21 6:15 [PATCH] drm/amd/display: Document the return values of the dc_update_state helpers TAKANO Mitsuhiro
@ 2026-12-04 19:01 ` George Zhang
0 siblings, 0 replies; 2+ messages in thread
From: George Zhang @ 2026-12-04 19:01 UTC (permalink / raw)
To: TAKANO Mitsuhiro, amd-gfx, Harry Wentland, Leo Li, Alex Deucher
Cc: Rodrigo Siqueira, Christian König, David Airlie,
Simona Vetter, dri-devel, linux-kernel
On 11/21/26 01:15, TAKANO Mitsuhiro wrote:
> [Some people who received this message don't often get email from takano32@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> kernel-doc -Wall reports:
>
> dc.h:2175 No description found for return value of
> 'dc_update_state_prepare'
> dc.h:2190 No description found for return value of
> 'dc_update_state_cleanup'
>
> Both functions return bool and their comments explain in prose what the
> caller must do next, but neither has a Return: section, so kernel-doc
> asks for one. Move the explanation into a Return: section and say when
> the scratch slot is released.
>
> No functional change.
>
> Written with Hermes Agent, an LLM assistant; the author reviewed it and
> ran kernel-doc on the file with and without the change.
>
> Signed-off-by: TAKANO Mitsuhiro <takano32@gmail.com>
Reviewed-by: George Zhang <george.zhang@amd.com>
> ---
> drivers/gpu/drm/amd/display/dc/dc.h | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
> index d3c484f45333..231a8ca2b18a 100644
> --- a/drivers/gpu/drm/amd/display/dc/dc.h
> +++ b/drivers/gpu/drm/amd/display/dc/dc.h
> @@ -2170,8 +2170,8 @@ struct dc_update_scratch_space *dc_update_state_init(
> * dc_update_state_prepare - Prepare the commit under the global lock.
> * @scratch: commit scratch from dc_update_state_init()
> *
> - * On failure the scratch slot is released and false is returned; the caller
> - * must not call execute or cleanup.
> + * Return: true on success, false on failure. On failure the scratch slot has
> + * already been released, so the caller must not call execute or cleanup.
> */
> bool dc_update_state_prepare(struct dc_update_scratch_space *scratch);
>
> @@ -2185,8 +2185,11 @@ void dc_update_state_execute(const struct dc_update_scratch_space *scratch);
> * dc_update_state_cleanup - Finalise the commit and release the scratch slot.
> * @scratch: commit scratch from dc_update_state_init()
> *
> - * Must be called with the global lock held. Returns true if the caller must
> - * loop back to prepare (SEAMLESS continuation).
> + * Must be called with the global lock held.
> + *
> + * Return: true if the caller must loop back to prepare (SEAMLESS
> + * continuation), false otherwise; the scratch slot is released before false
> + * is returned.
> */
> bool dc_update_state_cleanup(struct dc_update_scratch_space *scratch);
>
>
> base-commit: d0f871bfb831705d9f55479f5b2b40f636ea7b16
> --
> 2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-04 19:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-21 6:15 [PATCH] drm/amd/display: Document the return values of the dc_update_state helpers TAKANO Mitsuhiro
2026-12-04 19:01 ` George Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®