* [PATCH] clk: at91: clk-programmable: remove redundant value check of best_rate
@ 2021-03-16 3:07 Jian Dong
2021-08-29 6:42 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Jian Dong @ 2021-03-16 3:07 UTC (permalink / raw)
To: mturquette, sboyd, nicolas.ferre; +Cc: huyue2, linux-clk, dongjian
From: dongjian <dongjian@yulong.com>
for best_rate's initial value is -EINVAL, if get tmp_rate belongs to
[0, req-rate] at first time, then best_rate will be updated to a positive
value, the value check will never run;
if never get the tmp_rate belongs to [0, req-rate], then first cycle will
end when parent get NULL, the best_rate value check also will never run.
So, the value check is redundant.
Signed-off-by: dongjian <dongjian@yulong.com>
---
drivers/clk/at91/clk-programmable.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/clk/at91/clk-programmable.c b/drivers/clk/at91/clk-programmable.c
index fcf8f6a..5daf361e 100644
--- a/drivers/clk/at91/clk-programmable.c
+++ b/drivers/clk/at91/clk-programmable.c
@@ -87,9 +87,6 @@ static int clk_programmable_determine_rate(struct clk_hw *hw,
req->best_parent_rate = parent_rate;
req->best_parent_hw = parent;
}
-
- if (!best_rate)
- break;
}
if (best_rate < 0)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: at91: clk-programmable: remove redundant value check of best_rate
2021-03-16 3:07 [PATCH] clk: at91: clk-programmable: remove redundant value check of best_rate Jian Dong
@ 2021-08-29 6:42 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2021-08-29 6:42 UTC (permalink / raw)
To: Jian Dong, mturquette, nicolas.ferre; +Cc: huyue2, linux-clk, dongjian
Quoting Jian Dong (2021-03-15 20:07:25)
> From: dongjian <dongjian@yulong.com>
>
> for best_rate's initial value is -EINVAL, if get tmp_rate belongs to
> [0, req-rate] at first time, then best_rate will be updated to a positive
> value, the value check will never run;
> if never get the tmp_rate belongs to [0, req-rate], then first cycle will
> end when parent get NULL, the best_rate value check also will never run.
> So, the value check is redundant.
>
> Signed-off-by: dongjian <dongjian@yulong.com>
> ---
Please resend. It's been months and nobody has reviewed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-29 6:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 3:07 [PATCH] clk: at91: clk-programmable: remove redundant value check of best_rate Jian Dong
2021-08-29 6:42 ` Stephen Boyd
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.