public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jacopo Mondi <jacopo@jmondi.org>
Cc: linux-media@vger.kernel.org, Rui Miguel Silva <rmfrfs@gmail.com>,
	kernel@pengutronix.de, linux-imx@nxp.com,
	Paul Elder <paul.elder@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@iki.fi>
Subject: Re: [PATCH 4/5] media: imx: imx-mipi-csis: Remove duplicated check
Date: Tue, 15 Mar 2022 15:03:51 +0200	[thread overview]
Message-ID: <YjCOt9okSYIXjUJF@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220315122748.npt244uyzvewqmhw@uno.localdomain>

Hi Jacopo,

On Tue, Mar 15, 2022 at 01:27:48PM +0100, Jacopo Mondi wrote:
> On Tue, Mar 15, 2022 at 01:30:20PM +0200, Laurent Pinchart wrote:
> > On Mon, Mar 14, 2022 at 11:39:40AM +0100, Jacopo Mondi wrote:
> > > The mipi_csis_log_counters() function already checks for
> > > csis->debug.enable, it is not necessary to do the same in the caller.
> >
> > Does it ? It does only to decide whether or not to print counters that
> > have a zero value.
> 
> Roght, I mis-read the condition there.
> 
> What is the usage of the counters logger ? Should we make it
> conditional to debug.enable ?

It's been there from the very beginning, so I'm not sure what the
expected use cases where. I'd be tempted to actually move it to debugfs,
possibly with a single warning message at stream start if any error is
detected.

Rui, what do you think ?

> > > Compatc the code in the caller as well by removing an empty line.
> > >
> > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> > > ---
> > >  drivers/media/platform/imx/imx-mipi-csis.c | 5 +----
> > >  1 file changed, 1 insertion(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/media/platform/imx/imx-mipi-csis.c b/drivers/media/platform/imx/imx-mipi-csis.c
> > > index 4a6152c13d52..4bb469fcb6b3 100644
> > > --- a/drivers/media/platform/imx/imx-mipi-csis.c
> > > +++ b/drivers/media/platform/imx/imx-mipi-csis.c
> > > @@ -913,11 +913,8 @@ static int mipi_csis_s_stream(struct v4l2_subdev *sd, int enable)
> > >
> > >  	if (!enable) {
> > >  		v4l2_subdev_call(csis->src_sd, video, s_stream, 0);
> > > -
> > >  		mipi_csis_stop_stream(csis);
> > > -		if (csis->debug.enable)
> > > -			mipi_csis_log_counters(csis, true);
> > > -
> > > +		mipi_csis_log_counters(csis, true);
> > >  		pm_runtime_put(csis->dev);
> > >
> > >  		return 0;

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2022-03-15 13:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 10:39 [PATCH 0/5] media: imx: imx-mipi-csis: Additional cleanups Jacopo Mondi
2022-03-14 10:39 ` [PATCH 1/5] media: imx: imx-mipi-csis: Simplify mipi_csis_s_stream() Jacopo Mondi
2022-03-15 11:19   ` Laurent Pinchart
2022-03-14 10:39 ` [PATCH 2/5] media: imx: imx-mipi-csis: Drop powered flag Jacopo Mondi
2022-03-15 11:23   ` Laurent Pinchart
2022-03-14 10:39 ` [PATCH 3/5] media: imx: imx-mipi-csis: Remove lock from s_stream Jacopo Mondi
2022-03-15 11:26   ` Laurent Pinchart
2022-03-14 10:39 ` [PATCH 4/5] media: imx: imx-mipi-csis: Remove duplicated check Jacopo Mondi
2022-03-15 11:30   ` Laurent Pinchart
2022-03-15 12:27     ` Jacopo Mondi
2022-03-15 13:03       ` Laurent Pinchart [this message]
2022-03-15 13:53         ` Rui Miguel Silva
2022-03-14 10:39 ` [PATCH 5/5] media: imx: imx-mipi-csis: Protect mipi_csis_dump_regs() Jacopo Mondi
2022-03-15 11:34   ` Laurent Pinchart
2022-03-14 12:02 ` [PATCH 0/5] media: imx: imx-mipi-csis: Additional cleanups Rui Miguel Silva

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=YjCOt9okSYIXjUJF@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=jacopo@jmondi.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-imx@nxp.com \
    --cc=linux-media@vger.kernel.org \
    --cc=paul.elder@ideasonboard.com \
    --cc=rmfrfs@gmail.com \
    --cc=sakari.ailus@iki.fi \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox