[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <61220daf-ff1e-0c5d-b89e-9325625417ae@collabora.com>
Date: Fri, 28 Jan 2022 19:51:13 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Marc Kleine-Budde <mkl@...gutronix.de>
Cc: usama.anjum@...labora.com,
Steve Longerbeam <slongerbeam@...il.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
Martin Kepplinger <martink@...teo.de>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
linux-staging@...ts.linux.dev, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel@...labora.com,
linux-arm-kernel@...ts.infradead.org, linux-media@...r.kernel.org
Subject: Re: [PATCH] media: imx: imx8mq-mipi_csi2: Remove unneeded code
On 1/28/22 6:52 PM, Marc Kleine-Budde wrote:
> On 28.01.2022 18:36:49, 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.
>>
>> Fixes: f0c2ba1ed4ad ("media: imx: imx8mq-mipi_csi2: fix system resume")
>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
>> ---
>> 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
> [...]
>> 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;
>
>
> what about this flag?
Now that no error is possible inside this function. The state is being
updated each time. This seems correct logically.
Thanks,
Usama
Powered by blists - more mailing lists