mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] soc: qcom: pmic_glink: Drop redundant pg assignment before taking lock
@ 2025-01-11 17:23 Krzysztof Kozlowski
  2025-01-11 20:43 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2025-01-11 17:23 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Krzysztof Kozlowski,
	linux-arm-msm, linux-kernel

Commit e9f826b0459f ("soc: qcom: pmic_glink: simplify locking with
guard()") was on top of a fix [1] which was moving the 'pg =
__pmic_glink' assignment into the critical section.  Unfortunately the
actual fix was not applied and instead rebased version of the next patch
got in.  The resulting code is in general correct, but now there is a
duplicated assignment 'pg = __pmic_glink'.

[1] https://lore.kernel.org/all/20240822164815.230167-1-krzysztof.kozlowski@linaro.org/

Fixes: e9f826b0459f ("soc: qcom: pmic_glink: simplify locking with guard()")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/soc/qcom/pmic_glink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/qcom/pmic_glink.c b/drivers/soc/qcom/pmic_glink.c
index 052c292eeda6..cde19cdfd3c7 100644
--- a/drivers/soc/qcom/pmic_glink.c
+++ b/drivers/soc/qcom/pmic_glink.c
@@ -233,7 +233,7 @@ static void pmic_glink_pdr_callback(int state, char *svc_path, void *priv)
 
 static int pmic_glink_rpmsg_probe(struct rpmsg_device *rpdev)
 {
-	struct pmic_glink *pg = __pmic_glink;
+	struct pmic_glink *pg;
 
 	guard(mutex)(&__pmic_glink_lock);
 	pg = __pmic_glink;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-11 20:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-11 17:23 [PATCH] soc: qcom: pmic_glink: Drop redundant pg assignment before taking lock Krzysztof Kozlowski
2025-01-11 20:43 ` Bjorn Andersson

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®