Linux Remote Processor Subsystem development
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Bjorn Andersson <andersson@kernel.org>,
	linux-remoteproc@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH 1/3] remoteproc: k3-dsp: Suppress duplicate error message in .remove()
Date: Wed, 29 Nov 2023 10:35:32 -0700	[thread overview]
Message-ID: <ZWd2ZLahjfFs7+Ut@p14s> (raw)
In-Reply-To: <20231123211657.518181-6-u.kleine-koenig@pengutronix.de>

Hi Uwe,

On Thu, Nov 23, 2023 at 10:16:59PM +0100, Uwe Kleine-König wrote:
> When the remove callback returns non-zero, the driver core emits an
> error message about the error value being ignored. As the driver already
> emits an error message already, return zero. This has no effect apart
> from suppressing the core's message. The platform device gets unbound
> irrespective of the return value.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/remoteproc/ti_k3_dsp_remoteproc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/remoteproc/ti_k3_dsp_remoteproc.c b/drivers/remoteproc/ti_k3_dsp_remoteproc.c
> index ef8415a7cd54..40a5fd8763fa 100644
> --- a/drivers/remoteproc/ti_k3_dsp_remoteproc.c
> +++ b/drivers/remoteproc/ti_k3_dsp_remoteproc.c
> @@ -835,8 +835,9 @@ static int k3_dsp_rproc_remove(struct platform_device *pdev)
>  	if (rproc->state == RPROC_ATTACHED) {
>  		ret = rproc_detach(rproc);
>  		if (ret) {
> +			/* Note this error path leaks resources */

I'm not sure why this comment has been added...

>  			dev_err(dev, "failed to detach proc, ret = %d\n", ret);

And why this isn't refactored in the next patch.

> -			return ret;
> +			return 0;

Appart from the above I'm good with this patchset.

Thanks,
Mathieu

>  		}
>  	}
>  
> -- 
> 2.42.0
> 

  reply	other threads:[~2023-11-29 17:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-23 21:16 [PATCH 0/3] remoteproc: k3-dsp: Some cleanups Uwe Kleine-König
2023-11-23 21:16 ` [PATCH 1/3] remoteproc: k3-dsp: Suppress duplicate error message in .remove() Uwe Kleine-König
2023-11-29 17:35   ` Mathieu Poirier [this message]
2023-11-29 22:50     ` Uwe Kleine-König
2023-11-30 16:36       ` Mathieu Poirier
2023-11-30 17:19   ` Mathieu Poirier
2023-12-01  8:39     ` Uwe Kleine-König
2023-12-04 18:53     ` Hari Nagalla
2023-11-23 21:17 ` [PATCH 2/3] remoteproc: k3-dsp: Use symbolic error codes in error messages Uwe Kleine-König
2023-11-23 21:17 ` [PATCH 3/3] remoteproc: k3-dsp: Convert to platform remove callback returning void Uwe Kleine-König

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=ZWd2ZLahjfFs7+Ut@p14s \
    --to=mathieu.poirier@linaro.org \
    --cc=andersson@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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