From: "Christian König" <christian.koenig@amd.com>
To: Jiangshan Yi <yijiangshan@kylinos.cn>,
alexander.deucher@amd.com, airlied@gmail.com, simona@ffwll.ch
Cc: tvrtko.ursulin@igalia.com, sunil.khatri@amd.com,
vitaly.prosyak@amd.com, pierre-eric.pelloux-prayer@amd.com,
moonafterrain@outlook.com, candice.li@amd.com,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, 13667453960@163.com
Subject: Re: [PATCH] drm/amdgpu: remove redundant NULL check in amdgpu_cs_vm_handling
Date: Wed, 9 Sep 2026 11:59:48 +0200 [thread overview]
Message-ID: <37e9400e-47e7-49bf-9d75-0cfe9ae210ab@amd.com> (raw)
In-Reply-To: <20260909093728.642473-1-yijiangshan@kylinos.cn>
On 9/9/26 11:37, Jiangshan Yi wrote:
> bo_va is assigned from fpriv->csa_va, which is already verified to be
> non-NULL by the surrounding if statement. The inner NULL check can
> therefore never trigger and is dead code, so remove it.
>
> Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index 03b41f803520..c978f042ae1f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -1146,8 +1146,6 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
>
> if (fpriv->csa_va) {
> bo_va = fpriv->csa_va;
> - if (!bo_va)
> - return -ENOMEM;
> r = amdgpu_vm_bo_update(adev, bo_va, false);
> if (r)
> return r;
> --
> 2.25.1
>
next prev parent reply other threads:[~2026-09-09 9:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 9:37 [PATCH] drm/amdgpu: remove redundant NULL check in amdgpu_cs_vm_handling Jiangshan Yi
2026-09-09 9:59 ` Christian König [this message]
2026-09-09 16:07 ` Alex Deucher
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=37e9400e-47e7-49bf-9d75-0cfe9ae210ab@amd.com \
--to=christian.koenig@amd.com \
--cc=13667453960@163.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=candice.li@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=moonafterrain@outlook.com \
--cc=pierre-eric.pelloux-prayer@amd.com \
--cc=simona@ffwll.ch \
--cc=sunil.khatri@amd.com \
--cc=tvrtko.ursulin@igalia.com \
--cc=vitaly.prosyak@amd.com \
--cc=yijiangshan@kylinos.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.