mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: Steve Longerbeam <slongerbeam@gmail.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	"open list:MEDIA DRIVERS FOR FREESCALE IMX" 
	<linux-media@vger.kernel.org>,
	"open list:STAGING SUBSYSTEM" <linux-staging@lists.linux.dev>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
	<linux-arm-kernel@lists.infradead.org>,
	open list <linux-kernel@vger.kernel.org>,
	mkl@pengutronix.de
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
Date: Fri, 18 Feb 2022 16:08:00 +0500	[thread overview]
Message-ID: <cb4db484-c4e6-9cf9-baa5-0be454947ed5@collabora.com> (raw)
In-Reply-To: <20220128170722.1624767-1-usama.anjum@collabora.com>

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 <usama.anjum@collabora.com>
> ---
> 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)

  parent reply	other threads:[~2022-02-18 11:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 17:07 Muhammad Usama Anjum
2022-01-29 18:54 ` Fabio Estevam
2022-02-18 11:08 ` Muhammad Usama Anjum [this message]
2022-02-25 17:41   ` Muhammad Usama Anjum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb4db484-c4e6-9cf9-baa5-0be454947ed5@collabora.com \
    --to=usama.anjum@collabora.com \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kernel@collabora.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=p.zabel@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=slongerbeam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®