lkml.org 
[lkml]   [2015]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4] clk: Show correct information when fail to set clock rate
Date
This patch shows the correct information for debugging when fail to set clock
rate because original error message shows the error value instead of current
clock rate.

Cc: Mike Turquette <mturquette@linaro.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
Changes from v3:
- Show the correct information (clock rate, error value, current clock rate
after fail to set clock rate)
Changes from v2:
- Show the current clock rate when fail to set clock rate
Changes from v1:
- Add error value of clk_set_rate() with current clock rate

drivers/clk/clk-conf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c
index 48a65b2..000692b 100644
--- a/drivers/clk/clk-conf.c
+++ b/drivers/clk/clk-conf.c
@@ -106,8 +106,8 @@ static int __set_clk_rates(struct device_node *node, bool clk_supplier)

rc = clk_set_rate(clk, rate);
if (rc < 0)
- pr_err("clk: couldn't set %s clock rate: %d\n",
- __clk_get_name(clk), rc);
+ pr_err("clk: couldn't set %s clk rate to %d (%d), current rate: %ld\n",
+ __clk_get_name(clk), rate, rc, clk_get_rate(clk));
clk_put(clk);
}
index++;
--
1.8.5.5


\
 
 \ /
  Last update: 2015-04-27 12:01    [W:0.067 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site