소스 검색

disp: msm: fix always true/false conditionals

Remove unnecessary error conditionals that are
always true or false.

Change-Id: Ied1041b3165647364b741d3d95edca85039491c2
Signed-off-by: Samantha Tran <[email protected]>
Signed-off-by: Nilaan Gunabalachandran <[email protected]>
Samantha Tran 4 년 전
부모
커밋
da5f5ff1ae
5개의 변경된 파일5개의 추가작업 그리고 10개의 파일을 삭제
  1. 2 2
      msm/dsi/dsi_panel.c
  2. 1 1
      msm/sde/sde_hw_reg_dma_v1.c
  3. 0 5
      msm/sde/sde_hw_reg_dma_v1_color_proc.c
  4. 1 1
      msm/sde/sde_kms.c
  5. 1 1
      msm/sde/sde_trace.h

+ 2 - 2
msm/dsi/dsi_panel.c

@@ -2533,9 +2533,9 @@ static int dsi_panel_parse_dsc_params(struct dsi_display_mode *mode,
 		 */
 		priv_info->dsc.config.dsc_version_major = (data >> 4) & 0x0F;
 		priv_info->dsc.config.dsc_version_minor = data & 0x0F;
-		if ((priv_info->dsc.config.dsc_version_major != 0x1) &&
+		if ((priv_info->dsc.config.dsc_version_major != 0x1) ||
 				((priv_info->dsc.config.dsc_version_minor
-				  != 0x1) ||
+				  != 0x1) &&
 				 (priv_info->dsc.config.dsc_version_minor
 				  != 0x2))) {
 			DSI_ERR("%s:unsupported major:%d minor:%d version\n",

+ 1 - 1
msm/sde/sde_hw_reg_dma_v1.c

@@ -570,7 +570,7 @@ static int validate_kick_off_v1(struct sde_reg_dma_kickoff_cfg *cfg)
 		return -EOPNOTSUPP;
 	}
 
-	if (cfg->ctl->idx < CTL_0 && cfg->ctl->idx >= CTL_MAX) {
+	if (cfg->ctl->idx < CTL_0 || cfg->ctl->idx >= CTL_MAX) {
 		DRM_ERROR("invalid ctl idx %d\n", cfg->ctl->idx);
 		return -EINVAL;
 	}

+ 0 - 5
msm/sde/sde_hw_reg_dma_v1_color_proc.c

@@ -404,11 +404,6 @@ static int reg_dmav1_get_dspp_blk(struct sde_hw_cp_cfg *hw_cfg,
 		return -EINVAL;
 	}
 
-	if (hw_cfg->dspp == NULL) {
-		DRM_ERROR("Invalid sde_hw_dspp structure provided in hw_cfg\n");
-		return -EINVAL;
-	}
-
 	if (blk == NULL) {
 		DRM_ERROR("Invalid payload provided\n");
 		return -EINVAL;

+ 1 - 1
msm/sde/sde_kms.c

@@ -1452,7 +1452,7 @@ static void sde_kms_complete_commit(struct msm_kms *kms,
 		return;
 	priv = sde_kms->dev->dev_private;
 
-	if (sde_kms_power_resource_is_enabled(sde_kms->dev) < 0) {
+	if (!sde_kms_power_resource_is_enabled(sde_kms->dev)) {
 		SDE_ERROR("power resource is not enabled\n");
 		return;
 	}

+ 1 - 1
msm/sde/sde_trace.h

@@ -66,7 +66,7 @@ TRACE_EVENT(sde_perf_update_bus,
 	unsigned long long ib_quota, u32 paths),
 	TP_ARGS(bus_id, ab_quota, ib_quota, paths),
 	TP_STRUCT__entry(
-			__field(u32, bus_id);
+			__field(u32, bus_id)
 			__field(u64, ab_quota)
 			__field(u64, ib_quota)
 			__field(u32, paths)