lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220420030511.2575880-1-chi.minghao@zte.com.cn>
Date:   Wed, 20 Apr 2022 03:05:11 +0000
From:   cgel.zte@...il.com
To:     agross@...nel.org
Cc:     bjorn.andersson@...aro.org, mathieu.poirier@...aro.org,
        linux-arm-msm@...r.kernel.org, linux-remoteproc@...r.kernel.org,
        linux-kernel@...r.kernel.org, Minghao Chi <chi.minghao@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH] remoteproc: qcom: using pm_runtime_resume_and_get to simplify the code

From: Minghao Chi <chi.minghao@....com.cn>

Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
---
 drivers/remoteproc/qcom_wcnss.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index 9a223d394087..2c471c763b5b 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -228,11 +228,9 @@ static int wcnss_start(struct rproc *rproc)
 
 	for (i = 0; i < wcnss->num_pds; i++) {
 		dev_pm_genpd_set_performance_state(wcnss->pds[i], INT_MAX);
-		ret = pm_runtime_get_sync(wcnss->pds[i]);
-		if (ret < 0) {
-			pm_runtime_put_noidle(wcnss->pds[i]);
+		ret = pm_runtime_resume_and_get(wcnss->pds[i]);
+		if (ret < 0)
 			goto disable_pds;
-		}
 	}
 
 	ret = regulator_bulk_enable(wcnss->num_vregs, wcnss->vregs);
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ