All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 1/2] staging: media: imx: remove commented code
@ 2020-10-13 16:32 Deepak R Varma
  2020-10-13 16:34 ` [PATCH v4 2/2] staging: media: imx: remove unnecessary variable use Deepak R Varma
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Deepak R Varma @ 2020-10-13 16:32 UTC (permalink / raw)
  To: outreachy-kernel, Steve Longerbeam, Philipp Zabel,
	Mauro Carvalho Chehab, Greg Kroah-Hartman, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team

Commented code in the "#if 0" block does not appear to be useful anymore.
The virtual channel is always treated as 0 once the stream enters CSI's.
This issue is reported by checkpatch script.

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

---
Changes since v3:
   - Rephrase Patch description
   - Implement feedback from Vaishali & Helen to mention checkpatch in
     the patch description.
Changes since v2:
   - None
Changes since v1:
   - Implement feedback from Julia to be exact with the patch description

 drivers/staging/media/imx/imx-media-csi.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
index 21ebf7769696..9320e3974d86 100644
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -1131,13 +1131,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->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]);
 	}
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v4 2/2] staging: media: imx: remove unnecessary variable use
  2020-10-13 16:32 [PATCH v4 1/2] staging: media: imx: remove commented code Deepak R Varma
@ 2020-10-13 16:34 ` Deepak R Varma
  2020-10-13 18:01 ` [Outreachy kernel] [PATCH v4 1/2] staging: media: imx: remove commented code Helen Koike
  2020-10-15 11:46 ` Hans Verkuil
  2 siblings, 0 replies; 4+ messages in thread
From: Deepak R Varma @ 2020-10-13 16:34 UTC (permalink / raw)
  To: outreachy-kernel, Steve Longerbeam, Philipp Zabel,
	Mauro Carvalho Chehab, Greg Kroah-Hartman, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team

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 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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Outreachy kernel] [PATCH v4 1/2] staging: media: imx: remove commented code
  2020-10-13 16:32 [PATCH v4 1/2] staging: media: imx: remove commented code Deepak R Varma
  2020-10-13 16:34 ` [PATCH v4 2/2] staging: media: imx: remove unnecessary variable use Deepak R Varma
@ 2020-10-13 18:01 ` Helen Koike
  2020-10-15 11:46 ` Hans Verkuil
  2 siblings, 0 replies; 4+ messages in thread
From: Helen Koike @ 2020-10-13 18:01 UTC (permalink / raw)
  To: Deepak R Varma, outreachy-kernel, Steve Longerbeam,
	Philipp Zabel, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team

Hello,

On 10/13/20 1:32 PM, Deepak R Varma wrote:
> Commented code in the "#if 0" block does not appear to be useful anymore.

As Julia mentioned, "appears to be" implies some doubt, I saw you updated patch 2/2,
but not this one.

Sorry for the nip picking, it happens xD
I advice that, instead of sending the next version as quick as possible, you slow down a bit,
proofread, make sure you took previous feedbacks into account :)

> The virtual channel is always treated as 0 once the stream enters CSI's.
> This issue is reported by checkpatch script.
> 
> Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
> 
> ---
> Changes since v3:
>    - Rephrase Patch description
>    - Implement feedback from Vaishali & Helen to mention checkpatch in
>      the patch description.
> Changes since v2:
>    - None
> Changes since v1:
>    - Implement feedback from Julia to be exact with the patch description

Also, looking at your commit messages, when you sent v2 of patch 1/2, you mentioned
there was no changes.
Unless I saw it wrong, but it doesn't seem you changed the patch description
in this version.

Regards,
Helen

> 
>  drivers/staging/media/imx/imx-media-csi.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
> index 21ebf7769696..9320e3974d86 100644
> --- a/drivers/staging/media/imx/imx-media-csi.c
> +++ b/drivers/staging/media/imx/imx-media-csi.c
> @@ -1131,13 +1131,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->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]);
>  	}
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Outreachy kernel] [PATCH v4 1/2] staging: media: imx: remove commented code
  2020-10-13 16:32 [PATCH v4 1/2] staging: media: imx: remove commented code Deepak R Varma
  2020-10-13 16:34 ` [PATCH v4 2/2] staging: media: imx: remove unnecessary variable use Deepak R Varma
  2020-10-13 18:01 ` [Outreachy kernel] [PATCH v4 1/2] staging: media: imx: remove commented code Helen Koike
@ 2020-10-15 11:46 ` Hans Verkuil
  2 siblings, 0 replies; 4+ messages in thread
From: Hans Verkuil @ 2020-10-15 11:46 UTC (permalink / raw)
  To: Deepak R Varma, outreachy-kernel, Steve Longerbeam,
	Philipp Zabel, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team

Hi Deepak,

You're missing the linux-media mailinglist in your 'To' list. The MAINTAINERS file
mentions that, and adding that mailinglist will ensure that the media subsystem
maintainers will see this patch.

Regards,

	Hans


On 13/10/2020 18:32, Deepak R Varma wrote:
> Commented code in the "#if 0" block does not appear to be useful anymore.
> The virtual channel is always treated as 0 once the stream enters CSI's.
> This issue is reported by checkpatch script.
> 
> Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
> 
> ---
> Changes since v3:
>    - Rephrase Patch description
>    - Implement feedback from Vaishali & Helen to mention checkpatch in
>      the patch description.
> Changes since v2:
>    - None
> Changes since v1:
>    - Implement feedback from Julia to be exact with the patch description
> 
>  drivers/staging/media/imx/imx-media-csi.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
> index 21ebf7769696..9320e3974d86 100644
> --- a/drivers/staging/media/imx/imx-media-csi.c
> +++ b/drivers/staging/media/imx/imx-media-csi.c
> @@ -1131,13 +1131,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->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]);
>  	}
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-15 11:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 16:32 [PATCH v4 1/2] staging: media: imx: remove commented code Deepak R Varma
2020-10-13 16:34 ` [PATCH v4 2/2] staging: media: imx: remove unnecessary variable use Deepak R Varma
2020-10-13 18:01 ` [Outreachy kernel] [PATCH v4 1/2] staging: media: imx: remove commented code Helen Koike
2020-10-15 11:46 ` Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.