summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
diff options
context:
space:
mode:
authorJulia Lawall2017-01-10 06:52:59 +0100
committerAlex Deucher2017-01-27 17:13:30 +0100
commitf10b478d9e5f70f62d6a7b964922ab91299279eb (patch)
treebeeeaaebdc813291f692fabb8a4c15fa0d08279b /drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
parentdrm/amdgpu: use the num_rings variable for checking vce rings (diff)
downloadkernel-qcow2-linux-f10b478d9e5f70f62d6a7b964922ab91299279eb.tar.gz
kernel-qcow2-linux-f10b478d9e5f70f62d6a7b964922ab91299279eb.tar.xz
kernel-qcow2-linux-f10b478d9e5f70f62d6a7b964922ab91299279eb.zip
drm/amdgpu/gfx8: fix bugon.cocci warnings
Use BUG_ON instead of a if condition followed by BUG. Generated by: scripts/coccinelle/misc/bugon.cocci Reviewed-by: Christian König <christian.koenig@amd.com> Reviewd-by: Xiangliang.Yu <Xiangliang.Yu@amd.com> CC: Xiangliang Yu <Xiangliang.Yu@amd.com> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index aa053f628786..c8c45ba952c8 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -6671,8 +6671,7 @@ static void gfx_v8_0_ring_emit_fence_kiq(struct amdgpu_ring *ring, u64 addr,
u64 seq, unsigned int flags)
{
/* we only allocate 32bit for each seq wb address */
- if (flags & AMDGPU_FENCE_FLAG_64BIT)
- BUG();
+ BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT);
/* write fence seq to the "addr" */
amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));