[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241011052315.4713-1-everestkc@everestkc.com.np>
Date: Thu, 10 Oct 2024 23:23:14 -0600
From: "Everest K.C." <everestkc@...restkc.com.np>
To: robdclark@...il.com,
sean@...rly.run,
konradybcio@...nel.org,
quic_abhinavk@...cinc.com,
dmitry.baryshkov@...aro.org,
marijn.suijten@...ainline.org,
airlied@...il.com,
simona@...ll.ch
Cc: "Everest K.C." <everestkc@...restkc.com.np>,
skhan@...uxfoundation.org,
linux-arm-msm@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
freedreno@...ts.freedesktop.org,
kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH][next] 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: 35d36dc1692f ("drm/msm/a6xx: Add traces for preemption")
Signed-off-by: Everest K.C. <everestkc@...restkc.com.np>
---
drivers/gpu/drm/msm/adreno/a6xx_preempt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_preempt.c b/drivers/gpu/drm/msm/adreno/a6xx_preempt.c
index 6803d5af60cc..2fd4e39f618f 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_preempt.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_preempt.c
@@ -297,8 +297,7 @@ void a6xx_preempt_trigger(struct msm_gpu *gpu)
*/
ring->restore_wptr = false;
- trace_msm_gpu_preemption_trigger(a6xx_gpu->cur_ring->id,
- ring ? ring->id : -1);
+ trace_msm_gpu_preemption_trigger(a6xx_gpu->cur_ring->id, ring->id);
spin_unlock_irqrestore(&ring->preempt_lock, flags);
--
2.43.0
Powered by blists - more mailing lists