Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1299081pxb; Fri, 18 Feb 2022 05:04:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwaUZB8j1vnArscNmEJ4RIpL3NW1gyQZDTbQFWZ7TgBEPJBOKO6VONVVB3CH+5TNMUOp+H/ X-Received: by 2002:a5d:628e:0:b0:1e6:9092:a534 with SMTP id k14-20020a5d628e000000b001e69092a534mr5749181wru.1.1645189445046; Fri, 18 Feb 2022 05:04:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645189445; cv=none; d=google.com; s=arc-20160816; b=MoH/NOe46Fnm6+FRBBoFBB0b4Xm8h93mkLRPu1i0iL87YI66f7i1wPtOC4PLiXCEf7 Evc7KP/WFxdIfg7HGkChzGMxaxfolc7YQodZrK8ywAsDq7Lih+poMlqXBFHJSr+e0ymL SFpeNn0HgBmcyubWJ7XQ3a7Q1JouV+yIOzKXgtLNgwAeVDsvGQG9f9GA0iL8SfIIC3N+ /fBRqLGlctGBqqM/Y3kkExQC6DyYKToO1HaxmQK12yuVmkkdY0rFcDY9GVdu/zl1x49z dWTc+xX419NSTXAFWvlFBXIp0zGGWcSFYBAbahexhFV5hsaI2YeQ1dMc/DZVP94/f2ve pRcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=rODxvlok/t/488s6J4nuuylQD1HZDgUQM2jYDtoGknQ=; b=FjPDVmOnaeWZtJ+eiC6xtLFCdKWZknY4OmzCiHKqoGXrfTrhqP2G+VqEU9b9weuloG XlEawuR0SEOV8UZLZ155RM3Or3JR0mQsKr2L6WtIn4g9Dr+83x0XuS1QbWItxDmkea2+ 1Vnt6Rmm34bqHJXXc79a0HM2eBvXc392GwjgFpkKqYyLFQvQuCy6PtxMOF+QdVoLhxDj 1CDjfUQTcrArWf0zvrK1csERh0+gWMYSCb0zhGUVQ6/s2NoEkPxNmr/6PTyWuT9qnA53 ZISiRCzlgHWyS9ijn360OKEqOnwtJ8LXZsWTlGAPVBn/0Mn7DyhiG9Mqfzz7MmLqF/13 89zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Wj0tW+9G; 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=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 1si4145231ejb.217.2022.02.18.05.03.41; Fri, 18 Feb 2022 05:04:05 -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=@collabora.com header.s=mail header.b=Wj0tW+9G; 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=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234359AbiBRLI2 (ORCPT + 99 others); Fri, 18 Feb 2022 06:08:28 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:56942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232598AbiBRLI0 (ORCPT ); Fri, 18 Feb 2022 06:08:26 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23AD22AE73A; Fri, 18 Feb 2022 03:08:10 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id B2A481F46751 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1645182488; bh=MWH+/EKkY4LjLqgJrcKLJ7r78Z4lhuUmpr0kon7qvkg=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=Wj0tW+9GkMa6s8+StqasaD8bQ8GVceX1XiW5s2yWmvR2d1+xqNFU2ZcOa0w0tvhqW v7Z1Do5WOb6zUvAs8pgH9XXkRymc3slhIvm6juwFLlJVhInMN81yyJ6Y9dudvZm14G nYceNqcWFNOWBtQKNOcgter2/OJEdb5wIYZ0wgM9TXTNGznBCcPOmiUEuwb2p4hPJr CbyqbQdgJJ8MAchJj9Q3bnkKEbMITkSnJYFFnoeU54yWOtPtlFZQC6vleB2HrD422L 4sS2ZIT5rRK67K8c7z1Ygh5Yury9IVnEVo1D53+PwEzBuDMTsOFH+Ll2YjRBA74Zse F47n4UsVbNI4w== Message-ID: Date: Fri, 18 Feb 2022 16:08:00 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Cc: usama.anjum@collabora.com, kernel@collabora.com, kernel-janitors@vger.kernel.org Subject: Re: [PATCH V2] media: imx: imx8mq-mipi_csi2: Remove unneeded code Content-Language: en-US To: Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , "open list:MEDIA DRIVERS FOR FREESCALE IMX" , "open list:STAGING SUBSYSTEM" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , open list , mkl@pengutronix.de References: <20220128170722.1624767-1-usama.anjum@collabora.com> From: Muhammad Usama Anjum In-Reply-To: <20220128170722.1624767-1-usama.anjum@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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 Reminder. On 1/28/22 10:07 PM, Muhammad Usama Anjum wrote: > ret is constant in imx8mq_mipi_csi_pm_suspend(). This function cannot > return error. Remove the return variable. Simplify other functions which > are using this function. > > Signed-off-by: Muhammad Usama Anjum > --- > Changes in V2: > Removed fixes tag > --- > drivers/staging/media/imx/imx8mq-mipi-csi2.c | 16 ++++------------ > 1 file changed, 4 insertions(+), 12 deletions(-) > > diff --git a/drivers/staging/media/imx/imx8mq-mipi-csi2.c b/drivers/staging/media/imx/imx8mq-mipi-csi2.c > index 3b9fa75efac6b..c992b845e63d1 100644 > --- a/drivers/staging/media/imx/imx8mq-mipi-csi2.c > +++ b/drivers/staging/media/imx/imx8mq-mipi-csi2.c > @@ -693,11 +693,10 @@ static int imx8mq_mipi_csi_async_register(struct csi_state *state) > * Suspend/resume > */ > > -static int imx8mq_mipi_csi_pm_suspend(struct device *dev) > +static void imx8mq_mipi_csi_pm_suspend(struct device *dev) > { > struct v4l2_subdev *sd = dev_get_drvdata(dev); > struct csi_state *state = mipi_sd_to_csi2_state(sd); > - int ret = 0; > > mutex_lock(&state->lock); > > @@ -708,8 +707,6 @@ static int imx8mq_mipi_csi_pm_suspend(struct device *dev) > } > > mutex_unlock(&state->lock); > - > - return ret ? -EAGAIN : 0; > } > > static int imx8mq_mipi_csi_pm_resume(struct device *dev) > @@ -742,15 +739,12 @@ static int __maybe_unused imx8mq_mipi_csi_suspend(struct device *dev) > { > struct v4l2_subdev *sd = dev_get_drvdata(dev); > struct csi_state *state = mipi_sd_to_csi2_state(sd); > - int ret; > > - ret = imx8mq_mipi_csi_pm_suspend(dev); > - if (ret) > - return ret; > + imx8mq_mipi_csi_pm_suspend(dev); > > state->state |= ST_SUSPENDED; > > - return ret; > + return 0; > } > > static int __maybe_unused imx8mq_mipi_csi_resume(struct device *dev) > @@ -770,9 +764,7 @@ static int __maybe_unused imx8mq_mipi_csi_runtime_suspend(struct device *dev) > struct csi_state *state = mipi_sd_to_csi2_state(sd); > int ret; > > - ret = imx8mq_mipi_csi_pm_suspend(dev); > - if (ret) > - return ret; > + imx8mq_mipi_csi_pm_suspend(dev); > > ret = icc_set_bw(state->icc_path, 0, 0); > if (ret)