[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220531094539.252642-1-lizhengyu3@huawei.com>
Date: Tue, 31 May 2022 17:45:39 +0800
From: Li Zhengyu <lizhengyu3@...wei.com>
To: <quic_tdas@...cinc.com>
CC: <agross@...nel.org>, <bjorn.andersson@...aro.org>,
<sboyd@...nel.org>, <linux-arm-msm@...r.kernel.org>,
<linux-clk@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] clk: qcom: clk-rpmh: Fix if statement to match comment
(c->state) is u32, (enable) is bool. It returns false when
(c->state) > 1 and (enable) is true. Convert (c->state) to bool.
Signed-off-by: Li Zhengyu <lizhengyu3@...wei.com>
---
drivers/clk/qcom/clk-rpmh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
index aed907982344..851e127432a9 100644
--- a/drivers/clk/qcom/clk-rpmh.c
+++ b/drivers/clk/qcom/clk-rpmh.c
@@ -196,7 +196,7 @@ static int clk_rpmh_aggregate_state_send_command(struct clk_rpmh *c,
int ret;
/* Nothing required to be done if already off or on */
- if (enable == c->state)
+ if (enable == !!c->state)
return 0;
c->state = enable ? c->valid_state_mask : 0;
--
2.17.1
Powered by blists - more mailing lists