From: "Christian König" <christian.koenig@amd.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
alexander.deucher@amd.com
Cc: airlied@linux.ie, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
amd-gfx@lists.freedesktop.org, linux-media@vger.kernel.org
Subject: Re: [PATCH v3] amdgpu: remove unreachable code
Date: Fri, 28 May 2021 14:18:20 +0200 [thread overview]
Message-ID: <37a4f0bf-4acb-3961-699b-8335e194e315@amd.com> (raw)
In-Reply-To: <1622194158-70898-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Am 28.05.21 um 11:29 schrieb Jiapeng Chong:
> In the function amdgpu_uvd_cs_msg(), every branch in the switch
> statement will have a return, so the code below the switch statement
> will not be executed.
>
> Eliminate the follow smatch warning:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:845 amdgpu_uvd_cs_msg() warn:
> ignoring unreachable code.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> Changes in v2:
> -For the follow advice: https://lore.kernel.org/patchwork/patch/1435968/
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> index c6dbc08..35f6874 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> @@ -829,9 +829,8 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx,
>
> default:
> DRM_ERROR("Illegal UVD message type (%d)!\n", msg_type);
> - return -EINVAL;
> }
> - BUG();
> +
> return -EINVAL;
> }
>
next prev parent reply other threads:[~2021-05-28 12:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 9:29 [PATCH v3] amdgpu: remove unreachable code Jiapeng Chong
2021-05-28 12:18 ` Christian König [this message]
2021-06-02 1:57 ` 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=37a4f0bf-4acb-3961-699b-8335e194e315@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).