From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27CF3C433F5 for ; Tue, 15 Mar 2022 13:04:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344592AbiCONFX (ORCPT ); Tue, 15 Mar 2022 09:05:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238074AbiCONFX (ORCPT ); Tue, 15 Mar 2022 09:05:23 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 524FF4EA26 for ; Tue, 15 Mar 2022 06:04:11 -0700 (PDT) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3989B1BBB; Tue, 15 Mar 2022 14:04:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1647349449; bh=DxqLlxlIEmG/OA4W3vNdEKGmFERxT3cmUOWzsC/m4mw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lBC/26/R/Mhrb8pXc6/UJXsVyLWOUsw8zr8RZZ4iI90JZ/1cVgItShbVxUn+n9Ilq Y3xyP8c4/obEfWaV61H2Prwcy5dOuKscpxz57BPg5807p3RJ8b0CihOV8NJwzwuzFH pGR+ryHZr4F/VrN5tgxZ2nAbqNA239uuWUB+NvkA= Date: Tue, 15 Mar 2022 15:03:51 +0200 From: Laurent Pinchart To: Jacopo Mondi Cc: linux-media@vger.kernel.org, Rui Miguel Silva , kernel@pengutronix.de, linux-imx@nxp.com, Paul Elder , Sakari Ailus Subject: Re: [PATCH 4/5] media: imx: imx-mipi-csis: Remove duplicated check Message-ID: References: <20220314103941.46021-1-jacopo@jmondi.org> <20220314103941.46021-5-jacopo@jmondi.org> <20220315122748.npt244uyzvewqmhw@uno.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220315122748.npt244uyzvewqmhw@uno.localdomain> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 > > > --- > > > 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