Skip to contentSkip to conversation

Media: imx: Cleanup constant zero preprocessor lines

PATCH In review Wentao Cai 2 participants 2 messages Mar 1, 2019

Subsystems (4)
lore
Share & tools
lore

Wentao Cai

author
#0 lore raw

PATCH 1/1 Media: imx: Cleanup constant zero preprocessor lines

This patch fixes the checkpatch.pl warning:
WARNING: Consider removing the code enclosed by this #if 0 and its #endif

---
 drivers/staging/media/imx/imx-media-csi.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/staging/media/imx/imx-media-csi.c +0 -8
index 4223f8d418ae..3f43ade226e9 100644
@@ -1081,14 +1081,6 @@ static int csi_link_validate(struct v4l2_subdev *sd,
 		 * enters the CSI's however, they are treated internally
 		 * in the IPU as virtual channel 0.
 		 */
-#if 0
-		mutex_unlock(&priv->lock);
-		vc_num = imx_media_find_mipi_csi2_channel(priv->md,
-							  &priv->sd.entity);
-		if (vc_num < 0)
-			return vc_num;
-		mutex_lock(&priv->lock);
-#endif
 		ipu_csi_set_mipi_datatype(priv->csi, vc_num,
 					  &priv->format_mbus[CSI_SINK_PAD]);
 	}
Signature · 1 line
2.17.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 27 lines · Wentao Cai

This patch fixes the checkpatch.pl warning:
WARNING: Consider removing the code enclosed by this #if 0 and its #endif

---
  drivers/staging/media/imx/imx-media-csi.c | 8 --------
  1 file changed, 8 deletions(-)
drivers/staging/media/imx/imx-media-csi.c +0 -8
index 4223f8d418ae..3f43ade226e9 100644
@@ -1081,14 +1081,6 @@ static int csi_link_validate(struct v4l2_subdev *sd,
  		 * enters the CSI's however, they are treated internally
  		 * in the IPU as virtual channel 0.
  		 */
-#if 0
-		mutex_unlock(&priv->lock);
-		vc_num = imx_media_find_mipi_csi2_channel(priv->md,
-							  &priv->sd.entity);
-		if (vc_num < 0)
-			return vc_num;
-		mutex_lock(&priv->lock);
-#endif
  		ipu_csi_set_mipi_datatype(priv->csi, vc_num,
  					  &priv->format_mbus[CSI_SINK_PAD]);
  	}