Skip to content

Commit 45a4f88

Browse files
everestkcrobclark
authored andcommitted
drm/msm/a6xx: Remove logically deadcode in a6xx_preempt.c
The ternary operator never returns -1 as `ring` will never be NULL. Thus, the ternary operator is not needed. Fix this by removing the ternary operation and only including the value it will return when the `ring` is not NULL. This was reported by Coverity Scan. https://scan7.scan.coverity.com/#/project-view/51525/11354?selectedIssue=1600286 Fixes: 35d36dc ("drm/msm/a6xx: Add traces for preemption") Signed-off-by: Everest K.C. <everestkc@everestkc.com.np> Patchwork: https://patchwork.freedesktop.org/patch/619349/ Signed-off-by: Rob Clark <robdclark@chromium.org>
1 parent 74c3746 commit 45a4f88

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpu/drm/msm/adreno/a6xx_preempt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,7 @@ void a6xx_preempt_trigger(struct msm_gpu *gpu)
297297
*/
298298
ring->restore_wptr = false;
299299

300-
trace_msm_gpu_preemption_trigger(a6xx_gpu->cur_ring->id,
301-
ring ? ring->id : -1);
300+
trace_msm_gpu_preemption_trigger(a6xx_gpu->cur_ring->id, ring->id);
302301

303302
spin_unlock_irqrestore(&ring->preempt_lock, flags);
304303

0 commit comments

Comments
 (0)