linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: versatile: Remove WARNs in ->round_rate()
@ 2017-11-13 15:27 Brian Starkey
  2018-02-19 15:57 ` Sudeep Holla
  2018-03-16 22:31 ` Stephen Boyd
  0 siblings, 2 replies; 3+ messages in thread
From: Brian Starkey @ 2017-11-13 15:27 UTC (permalink / raw)
  To: linux-kernel, linux-clk; +Cc: sboyd, mturquette, sudeep.holla

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>
---
 drivers/clk/versatile/clk-vexpress-osc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/versatile/clk-vexpress-osc.c b/drivers/clk/versatile/clk-vexpress-osc.c
index e7a868b83fe5..59703d569d49 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;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: versatile: Remove WARNs in ->round_rate()
  2017-11-13 15:27 [PATCH] clk: versatile: Remove WARNs in ->round_rate() Brian Starkey
@ 2018-02-19 15:57 ` Sudeep Holla
  2018-03-16 22:31 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Sudeep Holla @ 2018-02-19 15:57 UTC (permalink / raw)
  To: Stephen Boyd, Michael Turquette
  Cc: open list, linux-clk, Sudeep Holla, Brian Starkey

On Mon, Nov 13, 2017 at 3:27 PM, Brian Starkey <brian.starkey@arm.com> wrote:
> 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>

Ping!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: versatile: Remove WARNs in ->round_rate()
  2017-11-13 15:27 [PATCH] clk: versatile: Remove WARNs in ->round_rate() Brian Starkey
  2018-02-19 15:57 ` Sudeep Holla
@ 2018-03-16 22:31 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2018-03-16 22:31 UTC (permalink / raw)
  To: Brian Starkey, linux-clk, linux-kernel; +Cc: sboyd, mturquette, sudeep.holla

Quoting Brian Starkey (2017-11-13 07:27:51)
> 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>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-16 22:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13 15:27 [PATCH] clk: versatile: Remove WARNs in ->round_rate() Brian Starkey
2018-02-19 15:57 ` Sudeep Holla
2018-03-16 22:31 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).