From: Alex Deucher <alexdeucher@gmail.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Cc: "Deucher, Alexander" <alexander.deucher@amd.com>,
Dave Airlie <airlied@linux.ie>,
LKML <linux-kernel@vger.kernel.org>,
Maling list - DRI developers <dri-devel@lists.freedesktop.org>,
"moderated list:DMA BUFFER SHARING FRAMEWORK"
<linaro-mm-sig@lists.linaro.org>,
amd-gfx list <amd-gfx@lists.freedesktop.org>,
Christian Koenig <christian.koenig@amd.com>,
linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH] drm/amdgpu: remove unreachable code
Date: Mon, 24 May 2021 14:48:55 -0400 [thread overview]
Message-ID: <CADnq5_N3WkoYHcn8b1-qZ23+t=E9xxV5fV_1Lwqck6x2dUPqmA@mail.gmail.com> (raw)
In-Reply-To: <1621853213-55876-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Applied. Thanks!
Alex
On Mon, May 24, 2021 at 6:47 AM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> 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>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> index 82f0542..375b346 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
> @@ -842,8 +842,6 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx,
> DRM_ERROR("Illegal UVD message type (%d)!\n", msg_type);
> return -EINVAL;
> }
> - BUG();
> - return -EINVAL;
> }
>
> /**
> --
> 1.8.3.1
>
next prev parent reply other threads:[~2021-05-24 18:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 10:46 [PATCH] drm/amdgpu: remove unreachable code Jiapeng Chong
2021-05-24 18:48 ` Alex Deucher [this message]
2021-05-25 15:27 ` Christian König
2021-05-25 15:38 ` Alex Deucher
2021-05-25 6:53 ` 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='CADnq5_N3WkoYHcn8b1-qZ23+t=E9xxV5fV_1Lwqck6x2dUPqmA@mail.gmail.com' \
--to=alexdeucher@gmail.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--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).