diff mbox series

[2/2,v5] staging: media: imx: remove unnecessary variable use

Message ID 6a22de0a51e06b7cb43d4a55850f3a0213532e42.1602869338.git.mh12gx2825@gmail.com
State Accepted
Commit b14e7b66b08d604689e14dcd5b82855b46201699
Headers show
Series [v5,1/2] staging: media: imx: remove commented code | expand

Commit Message

Deepak R Varma Oct. 16, 2020, 5:46 p.m. UTC
Use of variable vc_num is unnecessary here as it is used only once.
Instead, the value can directly be used in place of the variable.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
---
Changes since v4:
   - None.
Changes since v3:
   - None.
Changes since v2:
   - Implement feedback from Vaishali to simplify patch log message.
Changes since v1:
   - None.

 drivers/staging/media/imx/imx-media-csi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Steve Longerbeam Oct. 16, 2020, 5:46 p.m. UTC | #1
Acked-by: Steve Longerbeam <slongerbeam@gmail.com>


On 10/16/20 10:46 AM, Deepak R Varma wrote:
> Use of variable vc_num is unnecessary here as it is used only once.

> Instead, the value can directly be used in place of the variable.

>

> Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>

> ---

> Changes since v4:

>     - None.

> Changes since v3:

>     - None.

> Changes since v2:

>     - Implement feedback from Vaishali to simplify patch log message.

> Changes since v1:

>     - None.

>

>   drivers/staging/media/imx/imx-media-csi.c | 3 +--

>   1 file changed, 1 insertion(+), 2 deletions(-)

>

> diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c

> index 9320e3974d86..db77fef07654 100644

> --- a/drivers/staging/media/imx/imx-media-csi.c

> +++ b/drivers/staging/media/imx/imx-media-csi.c

> @@ -1123,7 +1123,6 @@ static int csi_link_validate(struct v4l2_subdev *sd,

>   	priv->upstream_ep = upstream_ep;

>   	is_csi2 = !is_parallel_bus(&upstream_ep);

>   	if (is_csi2) {

> -		int vc_num = 0;

>   		/*

>   		 * NOTE! It seems the virtual channels from the mipi csi-2

>   		 * receiver are used only for routing by the video mux's,

> @@ -1131,7 +1130,7 @@ 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.

>   		 */

> -		ipu_csi_set_mipi_datatype(priv->csi, vc_num,

> +		ipu_csi_set_mipi_datatype(priv->csi, 0,

>   					  &priv->format_mbus[CSI_SINK_PAD]);

>   	}

>
Deepak R Varma Oct. 26, 2020, 4:02 a.m. UTC | #2
On Fri, Oct 16, 2020 at 11:16:06PM +0530, Deepak R Varma wrote:

Hello All,
Request for review / ack of this patch.

Thank you.
Deepak.

> Use of variable vc_num is unnecessary here as it is used only once.

> Instead, the value can directly be used in place of the variable.

> 

> Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>

> ---

> Changes since v4:

>    - None.

> Changes since v3:

>    - None.

> Changes since v2:

>    - Implement feedback from Vaishali to simplify patch log message.

> Changes since v1:

>    - None.

> 

>  drivers/staging/media/imx/imx-media-csi.c | 3 +--

>  1 file changed, 1 insertion(+), 2 deletions(-)

> 

> diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c

> index 9320e3974d86..db77fef07654 100644

> --- a/drivers/staging/media/imx/imx-media-csi.c

> +++ b/drivers/staging/media/imx/imx-media-csi.c

> @@ -1123,7 +1123,6 @@ static int csi_link_validate(struct v4l2_subdev *sd,

>  	priv->upstream_ep = upstream_ep;

>  	is_csi2 = !is_parallel_bus(&upstream_ep);

>  	if (is_csi2) {

> -		int vc_num = 0;

>  		/*

>  		 * NOTE! It seems the virtual channels from the mipi csi-2

>  		 * receiver are used only for routing by the video mux's,

> @@ -1131,7 +1130,7 @@ 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.

>  		 */

> -		ipu_csi_set_mipi_datatype(priv->csi, vc_num,

> +		ipu_csi_set_mipi_datatype(priv->csi, 0,

>  					  &priv->format_mbus[CSI_SINK_PAD]);

>  	}

>  

> -- 

> 2.25.1

>
diff mbox series

Patch

diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
index 9320e3974d86..db77fef07654 100644
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -1123,7 +1123,6 @@  static int csi_link_validate(struct v4l2_subdev *sd,
 	priv->upstream_ep = upstream_ep;
 	is_csi2 = !is_parallel_bus(&upstream_ep);
 	if (is_csi2) {
-		int vc_num = 0;
 		/*
 		 * NOTE! It seems the virtual channels from the mipi csi-2
 		 * receiver are used only for routing by the video mux's,
@@ -1131,7 +1130,7 @@  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.
 		 */
-		ipu_csi_set_mipi_datatype(priv->csi, vc_num,
+		ipu_csi_set_mipi_datatype(priv->csi, 0,
 					  &priv->format_mbus[CSI_SINK_PAD]);
 	}