提交 a1d803d7 编写于 作者: B Brian Starkey 提交者: Stephen Boyd

clk: versatile: Remove WARNs in ->round_rate()

clk_round_rate() is intended to be used to round a given clock rate to
the closest one achievable by the actual clock. This implies that the
input to clk_round_rate() is expected to be unachievable - and such
cases shouldn't be treated as exceptional.

To reflect this, remove the WARN_ONs which trigger when an unachievable
clock rate is passed to vexpress_osc_round_rate().
Reported-by: NVladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: NBrian Starkey <brian.starkey@arm.com>
Acked-by: NSudeep Holla <sudeep.holla@arm.com>
Signed-off-by: NStephen Boyd <sboyd@kernel.org>
上级 aff2dc6b
...@@ -44,10 +44,10 @@ static long vexpress_osc_round_rate(struct clk_hw *hw, unsigned long rate, ...@@ -44,10 +44,10 @@ static long vexpress_osc_round_rate(struct clk_hw *hw, unsigned long rate,
{ {
struct vexpress_osc *osc = to_vexpress_osc(hw); struct vexpress_osc *osc = to_vexpress_osc(hw);
if (WARN_ON(osc->rate_min && rate < osc->rate_min)) if (osc->rate_min && rate < osc->rate_min)
rate = osc->rate_min; rate = osc->rate_min;
if (WARN_ON(osc->rate_max && rate > osc->rate_max)) if (osc->rate_max && rate > osc->rate_max)
rate = osc->rate_max; rate = osc->rate_max;
return rate; return rate;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册