diff options
author | Brian Starkey <brian.starkey@arm.com> | 2017-11-13 10:27:51 -0500 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2018-03-16 18:31:16 -0400 |
commit | a1d803d78b9e1ff82a0e5ef9d81202b23377f9e0 (patch) | |
tree | 9600f3badded5e293782461fd6bb980716aba5f8 | |
parent | aff2dc6b49fc642906eaa5523c5227c50fd77c50 (diff) |
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: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-rw-r--r-- | drivers/clk/versatile/clk-vexpress-osc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c index d3b5af2a02ab..dd08ecb498be 100644 --- a/drivers/clk/versatile/clk-vexpress-osc.c +++ b/drivers/clk/versatile/clk-vexpress-osc.c | |||
@@ -44,10 +44,10 @@ static long vexpress_osc_round_rate(struct clk_hw *hw, unsigned long rate, | |||
44 | { | 44 | { |
45 | struct vexpress_osc *osc = to_vexpress_osc(hw); | 45 | struct vexpress_osc *osc = to_vexpress_osc(hw); |
46 | 46 | ||
47 | if (WARN_ON(osc->rate_min && rate < osc->rate_min)) | 47 | if (osc->rate_min && rate < osc->rate_min) |
48 | rate = osc->rate_min; | 48 | rate = osc->rate_min; |
49 | 49 | ||
50 | if (WARN_ON(osc->rate_max && rate > osc->rate_max)) | 50 | if (osc->rate_max && rate > osc->rate_max) |
51 | rate = osc->rate_max; | 51 | rate = osc->rate_max; |
52 | 52 | ||
53 | return rate; | 53 | return rate; |