All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Enrique Vargas <jevargas@seas.upenn.edu>
Cc: Steve Longerbeam <slongerbeam@gmail.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH v3] Staging: media: imx: eliminate unused code
Date: Tue, 17 Mar 2020 02:05:37 +0100	[thread overview]
Message-ID: <20200317020537.1eff25a3@elisabeth> (raw)
In-Reply-To: <20200313172019.GA22581@evX1>

On Fri, 13 Mar 2020 11:21:49 -0600
Enrique Vargas <jevargas@seas.upenn.edu> wrote:

> Eliminate code that is never used inside #ifdef 0 / #endif.  This eliminates WARNING found using checkpatch.

This should be wrapped to at most 76 characters, so that it can be
displayed by git (e.g. git log) without exceeding 80 columns. Some
personally prefer 72 columns or even less, I usually stick to 70.

> Signed-off-by: Enrique Vargas <jevargas@seas.upenn.edu>
> ---
> v2 Fix description typo with broken line
> v3 Include change control, as suggested by Greg.
> 
>  drivers/staging/media/imx/imx-media-csi.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
> index b60ed4f22f6d..2001f7851e90 100644
> --- a/drivers/staging/media/imx/imx-media-csi.c
> +++ b/drivers/staging/media/imx/imx-media-csi.c
> @@ -1131,13 +1131,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.
>  		 */
> -#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]);

By the way, now that you remove that, it's not clear from the comment
why vc_num is even a variable. You could directly call
ipu_csi_set_mipi_datatype() with 0 as channel (in this patch, or in
another one, I don't have a strong preference -- I would personally
do that in the same patch).

-- 
Stefano



      parent reply	other threads:[~2020-03-17  1:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 17:21 [PATCH v3] Staging: media: imx: eliminate unused code Enrique Vargas
2020-03-14  0:54 ` Steve Longerbeam
2020-03-17  1:05 ` Stefano Brivio [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200317020537.1eff25a3@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jevargas@seas.upenn.edu \
    --cc=kernel@pengutronix.de \
    --cc=linux-imx@nxp.com \
    --cc=mchehab@kernel.org \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=p.zabel@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=slongerbeam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.