* [PATCH] remoteproc: Cancel init error to zero
@ 2025-06-04 9:48 Li Jun
2025-06-06 14:42 ` Mathieu Poirier
0 siblings, 1 reply; 2+ messages in thread
From: Li Jun @ 2025-06-04 9:48 UTC (permalink / raw)
To: andersson, mathieu.poirier, linux-remoteproc, lijun01
The init action consume additional CPU cycles. the
reset_control_assert(wkupm3->rsts) should assign a value
to 'error' before it is return.so the var don't need init
to 0.
Signed-off-by: Li Jun <lijun01@kylinos.cn>
---
drivers/remoteproc/wkup_m3_rproc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/remoteproc/wkup_m3_rproc.c b/drivers/remoteproc/wkup_m3_rproc.c
index d8be21e71721..24d72fcc26f9 100644
--- a/drivers/remoteproc/wkup_m3_rproc.c
+++ b/drivers/remoteproc/wkup_m3_rproc.c
@@ -77,9 +77,7 @@ static int wkup_m3_rproc_stop(struct rproc *rproc)
struct platform_device *pdev = wkupm3->pdev;
struct device *dev = &pdev->dev;
struct wkup_m3_platform_data *pdata = dev_get_platdata(dev);
- int error = 0;
-
- error = reset_control_assert(wkupm3->rsts);
+ int error = reset_control_assert(wkupm3->rsts);
if (!wkupm3->rsts && pdata->assert_reset(pdev, pdata->reset_name)) {
dev_err(dev, "Unable to assert reset of wkup_m3!\n");
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] remoteproc: Cancel init error to zero
2025-06-04 9:48 [PATCH] remoteproc: Cancel init error to zero Li Jun
@ 2025-06-06 14:42 ` Mathieu Poirier
0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Poirier @ 2025-06-06 14:42 UTC (permalink / raw)
To: Li Jun; +Cc: andersson, linux-remoteproc
Good day,
On Wed, Jun 04, 2025 at 05:48:02PM +0800, Li Jun wrote:
> The init action consume additional CPU cycles. the
I'm fine with code cleanup but call it what it is rather than trying to justify
it with dubious claims. Please remove the above sentence.
> reset_control_assert(wkupm3->rsts) should assign a value
> to 'error' before it is return.so the var don't need init
Proper punctuation after a period.
Thanks,
Mathieu
> to 0.
>
> Signed-off-by: Li Jun <lijun01@kylinos.cn>
> ---
> drivers/remoteproc/wkup_m3_rproc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/remoteproc/wkup_m3_rproc.c b/drivers/remoteproc/wkup_m3_rproc.c
> index d8be21e71721..24d72fcc26f9 100644
> --- a/drivers/remoteproc/wkup_m3_rproc.c
> +++ b/drivers/remoteproc/wkup_m3_rproc.c
> @@ -77,9 +77,7 @@ static int wkup_m3_rproc_stop(struct rproc *rproc)
> struct platform_device *pdev = wkupm3->pdev;
> struct device *dev = &pdev->dev;
> struct wkup_m3_platform_data *pdata = dev_get_platdata(dev);
> - int error = 0;
> -
> - error = reset_control_assert(wkupm3->rsts);
> + int error = reset_control_assert(wkupm3->rsts);
>
> if (!wkupm3->rsts && pdata->assert_reset(pdev, pdata->reset_name)) {
> dev_err(dev, "Unable to assert reset of wkup_m3!\n");
> --
> 2.25.1
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-06 14:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-04 9:48 [PATCH] remoteproc: Cancel init error to zero Li Jun
2025-06-06 14:42 ` Mathieu Poirier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.