All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Wentao Liang" <vulab@iscas.ac.cn>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/amdgpu: fix cleaner shader IB size and entity cleanup
Date: Mon, 22 Jun 2026 14:35:06 +0000	[thread overview]
Message-ID: <20260622143507.736ED1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260622142305.45791-1-vulab@iscas.ac.cn>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch leaves an unused assignment to `r` after removing the error check for `dma_fence_wait`, resulting in a dead store.
--

commit 24bfae44dd9f0251a61d22e1439ca564bf70d1a3
Author: Wentao Liang <vulab@iscas.ac.cn>

drm/amdgpu: fix cleaner shader IB size and entity cleanup

This commit dynamically calculates the indirect buffer size based on
align_mask to prevent memory corruption. It also ensures the scheduler
entity is properly destroyed on error paths and removes an unneeded error
check after waiting on the fence.

Cc: stable@vger.kernel.org

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> index b8ca876694ff8..2da917e18d93b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c

[ ... ]

> @@ -1686,8 +1694,6 @@ static int amdgpu_gfx_run_cleaner_shader_job(struct amdgpu_ring *ring)
>  	f = amdgpu_job_submit(job);
>  
>  	r = dma_fence_wait(f, false);
> -	if (r)
> -		goto err;

[Severity: Low]
Does this leave an unused assignment to r in amdgpu_gfx_run_cleaner_shader_job()?

Since the error check was correctly removed (as dma_fence_wait with intr=false
does not return an error), the assigned value is never read before the
function unconditionally returns 0. Could this cause a dead store compiler
warning?

>  
>  	dma_fence_put(f);
>

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260622142305.45791-1-vulab@iscas.ac.cn?part=1

  reply	other threads:[~2026-06-22 14:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22 14:23 [PATCH v2] drm/amdgpu: fix cleaner shader IB size and entity cleanup Wentao Liang
2026-06-22 14:35 ` sashiko-bot [this message]
2026-06-22 14:48 ` Christian König

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=20260622143507.736ED1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vulab@iscas.ac.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.