All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

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.