From: Brian Starkey Date: Mon, 13 Nov 2017 15:27:51 +0000 (+0000) Subject: clk: versatile: Remove WARNs in ->round_rate() X-Git-Tag: v4.17-rc1~18^2~6^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a1d803d78b9e1ff82a0e5ef9d81202b23377f9e0;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Brian Starkey Acked-by: Sudeep Holla Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c index d3b5af2a02ab0..dd08ecb498be2 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, { 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; - if (WARN_ON(osc->rate_max && rate > osc->rate_max)) + if (osc->rate_max && rate > osc->rate_max) rate = osc->rate_max; return rate;