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 <[email protected]>

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: [email protected]

> 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/[email protected]?part=1

Reply via email to