mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: George Zhang <george.zhang@amd.com>
To: TAKANO Mitsuhiro <takano32@gmail.com>,
	amd-gfx@lists.freedesktop.org,
	Harry Wentland <harry.wentland@amd.com>,
	Leo Li <sunpeng.li@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>
Cc: "Rodrigo Siqueira" <siqueira@igalia.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/amd/display: Document the return values of the dc_update_state helpers
Date: Fri, 4 Dec 2026 14:01:37 -0500	[thread overview]
Message-ID: <697d8989-bc98-4836-86c5-22ee7e576305@amd.com> (raw)
In-Reply-To: <20261121061516.1830533-1-takano32@gmail.com>



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


      reply	other threads:[~2026-12-04 19:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-21  6:15 TAKANO Mitsuhiro
2026-12-04 19:01 ` George Zhang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=697d8989-bc98-4836-86c5-22ee7e576305@amd.com \
    --to=george.zhang@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=siqueira@igalia.com \
    --cc=sunpeng.li@amd.com \
    --cc=takano32@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®