2022-06-13 06:59:58

by Li Zhengyu

[permalink] [raw]
Subject: [PATCH] clk: qcom: clk-rpmh: Remove redundant if statement

By the clk framework already reference counts prepare/unprepare,
this if statement should be never true.

Signed-off-by: Li Zhengyu <[email protected]>
---
Previous threads:
https://lore.kernel.org/all/[email protected]/

drivers/clk/qcom/clk-rpmh.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
index aed907982344..249146947923 100644
--- a/drivers/clk/qcom/clk-rpmh.c
+++ b/drivers/clk/qcom/clk-rpmh.c
@@ -195,10 +195,6 @@ 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)
- return 0;
-
c->state = enable ? c->valid_state_mask : 0;
c->aggr_state = c->state | c->peer->state;
c->peer->aggr_state = c->aggr_state;
--
2.17.1


2022-06-14 19:19:08

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH] clk: qcom: clk-rpmh: Remove redundant if statement

Quoting Li Zhengyu (2022-06-12 23:33:27)
> By the clk framework already reference counts prepare/unprepare,
> this if statement should be never true.
>
> Signed-off-by: Li Zhengyu <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>