Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11723542rwl; Tue, 3 Jan 2023 03:56:15 -0800 (PST) X-Google-Smtp-Source: AMrXdXugZ+D/TPCnH++R9fGwRHlOnoN5Axt7oZ9KgVS6IQqV26p36CpmblWvmDBAYqMxynbZNJin X-Received: by 2002:aa7:c053:0:b0:482:e3b9:f46e with SMTP id k19-20020aa7c053000000b00482e3b9f46emr27959072edo.39.1672746974889; Tue, 03 Jan 2023 03:56:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672746974; cv=none; d=google.com; s=arc-20160816; b=SH4kU9SnvNKHVtI5C/4m+nEjm36pr08KDNU35K3h1F4H/6lLleulroycka9GuvqihU SP0SY/QJ6SIMbPNRFyvDkpemeO4g7ku9oWNC2CNw4jLMIk+2dUp/fhnIDuWvukYZBYDC 8w53IkxCMGms4rySSEsa1b3I8H8gy+Sj873tq48iF7ulW7DbWJQKGcYEDbmvnrXnygTX wu9fy7rfKdBLJXyEWgNZxbWfxSsAwh7JqwxsSpsWdtBBkr8imrUFl7RpWhn6aKROCXrg R+PG0LHbilM4tF3E6gwu7U4nCfy6GWE6l0pukxAPndsruUoNIEhIA1q1Ojv2bdOy4g8f 8/bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=t+ASKySmgpYe6aeuyIud7plzReCzUcsxfQRRqpb3dCM=; b=G9eyAesXJese+2aY7U6VwhwlGI1xWuT2e5uX7VB/PXF/WFRFs29Y/dlQ+FR+lBFQz8 zmLZ7X2a+pKMRh/WTmamCR/07SDSWfUT6MqVsX2pwAAQgKCeR0W3H17cBfpN8YdZ7u22 HHYlVbXWxi2nNcA6rApsO8V6LNKF0H//Jq/00J8td6hhUvS/4AyyVCduYtIstH+M+g8Z vovxGST5fh8atzz1HiH0KyxoyMPuy3fDMEe/tAfflWM2SvxdlGX8xJEWtvmOdCAZeDP3 rNe67PLCZOA5S0WnLcnkkwOVzJn/yFfgZWwzRyLMSpTX749fi6Zn0MVjiYPPgTzAOaxc Fptw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dLWgbFCg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t6-20020a50d706000000b0046bb19bce74si26102967edi.441.2023.01.03.03.56.01; Tue, 03 Jan 2023 03:56:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dLWgbFCg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237396AbjACLvM (ORCPT + 60 others); Tue, 3 Jan 2023 06:51:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237314AbjACLvJ (ORCPT ); Tue, 3 Jan 2023 06:51:09 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B83F96587; Tue, 3 Jan 2023 03:51:03 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id d15so32358289pls.6; Tue, 03 Jan 2023 03:51:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=t+ASKySmgpYe6aeuyIud7plzReCzUcsxfQRRqpb3dCM=; b=dLWgbFCgL/n8+lBOD8gxbhiFHszFpeZo6BLDCarxXTBswHednpdDH3tiBOUHIzQOp5 TI0Rdf7kTZRDLe00zrmwQUVOnpj8jr/TmHnW2/kUSku2MJ7gvJrX1vYGaPl7Y8Yn35mX EogWrpq293abNtofIdw5cybQ7/bzkBtlUP+qOcJSTzOi7xIUvg7w2+E5N6c7ATvIDKZW OOhoOBKu1bxEhC4gJM69Lis/aPWlt6gtIKIEvjGqcnshfQqMLj9V7XQ45PGLrUweHVfV SfXHCcMqpBIIorivPDikeOufr+z7HteEdwseA9IGlJIARcJjUBY1i/ezVdzKhQBIJKLy 9xzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=t+ASKySmgpYe6aeuyIud7plzReCzUcsxfQRRqpb3dCM=; b=wqre/ji89OaFdZMtB8vfxw0bdhG0dZ21MJe2uvSO12gJMlf/NkWWV9Y7mOSRzjlxxA 1s8xKdl53iIK5pRUky5vGgXUy3lx4ELfvIs/RP6i3NodUr9RWjynx8PIDIPowPwIaeVM F8Uw+t45vWQiOy0JwYMWAJHCNFu2GvG0NPnLFCRCq17tR2eWLXrNH43BYgOZwvitehEj IgooHFIWGsc9WPPJ4Fsv7TvU6DtH6yjwNdc7NimODwJXu2DzNQ3qpl8GZJI7Uxb4YWuC dmX8VZcZtHyUmpubRzpzi4dt6+Owdzn02lsEqSBV6zWcN8DJx7C4+lW9nCdRLPrxRmot ojHw== X-Gm-Message-State: AFqh2kqss0v7uqq1Cc2h/n8zfunbHCFE76mTuUBDA4xBZb8qVvC7LNCq IjyCNQ7HkoIlruDEWZuP/IcRd8dcZUCkHWOOTas= X-Received: by 2002:a17:90b:485:b0:219:720c:29cb with SMTP id bh5-20020a17090b048500b00219720c29cbmr4199206pjb.76.1672746663119; Tue, 03 Jan 2023 03:51:03 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Fabio Estevam Date: Tue, 3 Jan 2023 08:50:51 -0300 Message-ID: Subject: Re: [PATCH] staging: media: imx: remove unnecessary return variable To: Deepak R Varma Cc: Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Saurabh Singh Sengar , Praveen Kumar Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 3, 2023 at 8:45 AM Deepak R Varma wrote: > > The function imx_media_fim_set_stream() can directly return 0 instead of > using a ret variable which never changes its value. Issue identified > using the returnvar.cocci Coccinelle semantic patch. > > Signed-off-by: Deepak R Varma > --- > drivers/staging/media/imx/imx-media-fim.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/media/imx/imx-media-fim.c b/drivers/staging/media/imx/imx-media-fim.c > index fb6590dcfc36..e719227d4323 100644 > --- a/drivers/staging/media/imx/imx-media-fim.c > +++ b/drivers/staging/media/imx/imx-media-fim.c > @@ -373,7 +373,6 @@ int imx_media_fim_set_stream(struct imx_media_fim *fim, > bool on) > { > unsigned long flags; > - int ret = 0; > > v4l2_ctrl_lock(fim->ctrl[FIM_CL_ENABLE]); > > @@ -393,7 +392,7 @@ 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; > + return 0; Maybe you could change imx_media_fim_set_stream() to a void function instead?