Re: [PATCH 6/6] drm/msm: dpu: Clean up _dpu_core_video_mode_intf_connected()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-09-20 07:58, Sean Paul wrote:
From: Sean Paul <seanpaul@xxxxxxxxxxxx>

Local variable is not needed and condition can't be hit.

Signed-off-by: Sean Paul <seanpaul@xxxxxxxxxxxx>

Reviewed-by: Jeykumar Sankaran <jsanka@xxxxxxxxxxxxxx>

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
index affc9738e2b5..22e84b3d7f98 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
@@ -65,22 +65,17 @@ static bool _dpu_core_perf_crtc_is_power_on(struct
drm_crtc *crtc)
 static bool _dpu_core_video_mode_intf_connected(struct drm_crtc *crtc)
 {
 	struct drm_crtc *tmp_crtc;
-	bool intf_connected = false;
-
-	if (!crtc)
-		return intf_connected;

 	drm_for_each_crtc(tmp_crtc, crtc->dev) {
 		if ((dpu_crtc_get_intf_mode(tmp_crtc) == INTF_MODE_VIDEO)
&&
 				_dpu_core_perf_crtc_is_power_on(tmp_crtc))
{
 			DPU_DEBUG("video interface connected crtc:%d\n",
 				tmp_crtc->base.id);
-			intf_connected = true;
-			return intf_connected;
+			return true;
 		}
 	}

-	return intf_connected;
+	return false;
 }

 static void _dpu_core_perf_calc_crtc(struct dpu_kms *kms,

--
Jeykumar S



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux