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 DAC6CC05027 for ; Mon, 23 Jan 2023 09:24:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231599AbjAWJY1 (ORCPT ); Mon, 23 Jan 2023 04:24:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231131AbjAWJYY (ORCPT ); Mon, 23 Jan 2023 04:24:24 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6D1915547 for ; Mon, 23 Jan 2023 01:24:23 -0800 (PST) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pJt3f-0000OC-Dl; Mon, 23 Jan 2023 10:24:07 +0100 Received: from mfe by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1pJt3d-0000se-BA; Mon, 23 Jan 2023 10:24:05 +0100 Date: Mon, 23 Jan 2023 10:24:05 +0100 From: Marco Felsch To: Deepak R Varma Cc: Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Praveen Kumar , Saurabh Singh Sengar Subject: Re: [PATCH v2] staging: media: imx: change imx_media_fim_set_stream() to return void Message-ID: <20230123092405.lwaosnsnlj7tvnmt@pengutronix.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, the patch lgtm. On 23-01-23, Deepak R Varma wrote: > On Tue, Jan 03, 2023 at 11:08:20PM +0530, Deepak R Varma wrote: > > At present, the function imx_media_fim_set_stream() always returns 0. > > So, convert it to be a function returning void instead. Issue identified > > using the returnvar.cocci Coccinelle semantic patch. > > > > Signed-off-by: Deepak R Varma Reviewed-by: Marco Felsch > > --- > > Changes in v2: > > 1. Convert the function return type from int to void. Suggested by > > Fabio Estevam > > 2. Update patch subject and log accordingly. > > Hello, > May I request a review and feedback comment on this patch proposal please? > > Thank you, > ./drv > > > > > > > drivers/staging/media/imx/imx-media-csi.c | 7 ++----- > > drivers/staging/media/imx/imx-media-fim.c | 8 +++----- > > drivers/staging/media/imx/imx-media.h | 6 +++--- > > 3 files changed, 8 insertions(+), 13 deletions(-) > > > > diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c > > index 5c3cc7de209d..44d87fe30d52 100644 > > --- a/drivers/staging/media/imx/imx-media-csi.c > > +++ b/drivers/staging/media/imx/imx-media-csi.c > > @@ -779,11 +779,8 @@ static int csi_start(struct csi_priv *priv) > > goto idmac_stop; > > > > /* start the frame interval monitor */ > > - if (priv->fim && priv->dest == IPU_CSI_DEST_IDMAC) { > > - ret = imx_media_fim_set_stream(priv->fim, output_fi, true); > > - if (ret) > > - goto idmac_stop; > > - } > > + if (priv->fim && priv->dest == IPU_CSI_DEST_IDMAC) > > + imx_media_fim_set_stream(priv->fim, output_fi, true); > > > > ret = ipu_csi_enable(priv->csi); > > if (ret) { > > diff --git a/drivers/staging/media/imx/imx-media-fim.c b/drivers/staging/media/imx/imx-media-fim.c > > index fb6590dcfc36..f456751f100a 100644 > > --- a/drivers/staging/media/imx/imx-media-fim.c > > +++ b/drivers/staging/media/imx/imx-media-fim.c > > @@ -368,12 +368,11 @@ void imx_media_fim_eof_monitor(struct imx_media_fim *fim, ktime_t timestamp) > > } > > > > /* Called by the subdev in its s_stream callback */ > > -int imx_media_fim_set_stream(struct imx_media_fim *fim, > > - const struct v4l2_fract *fi, > > - bool on) > > +void imx_media_fim_set_stream(struct imx_media_fim *fim, > > + const struct v4l2_fract *fi, > > + bool on) > > { > > unsigned long flags; > > - int ret = 0; > > > > v4l2_ctrl_lock(fim->ctrl[FIM_CL_ENABLE]); > > > > @@ -393,7 +392,6 @@ int imx_media_fim_set_stream(struct imx_media_fim *fim, > > fim->stream_on = on; > > out: > > v4l2_ctrl_unlock(fim->ctrl[FIM_CL_ENABLE]); > > - return ret; > > } > > > > int imx_media_fim_add_controls(struct imx_media_fim *fim) > > diff --git a/drivers/staging/media/imx/imx-media.h b/drivers/staging/media/imx/imx-media.h > > index f679249d82e4..6f9a46573edd 100644 > > --- a/drivers/staging/media/imx/imx-media.h > > +++ b/drivers/staging/media/imx/imx-media.h > > @@ -246,9 +246,9 @@ int imx_media_dev_notifier_register(struct imx_media_dev *imxmd, > > /* imx-media-fim.c */ > > struct imx_media_fim; > > void imx_media_fim_eof_monitor(struct imx_media_fim *fim, ktime_t timestamp); > > -int imx_media_fim_set_stream(struct imx_media_fim *fim, > > - const struct v4l2_fract *frame_interval, > > - bool on); > > +void imx_media_fim_set_stream(struct imx_media_fim *fim, > > + const struct v4l2_fract *frame_interval, > > + bool on); > > int imx_media_fim_add_controls(struct imx_media_fim *fim); > > struct imx_media_fim *imx_media_fim_init(struct v4l2_subdev *sd); > > void imx_media_fim_free(struct imx_media_fim *fim); > > -- > > 2.34.1 > > > > > >