[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1621853213-55876-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Date: Mon, 24 May 2021 18:46:53 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: alexander.deucher@....com
Cc: christian.koenig@....com, airlied@...ux.ie, daniel@...ll.ch,
sumit.semwal@...aro.org, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org, linaro-mm-sig@...ts.linaro.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH] drm/amdgpu: remove unreachable code
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@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.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
Powered by blists - more mailing lists