Skip to contentSkip to conversation

clk: Show the clock rate when fail to set clock rate

PATCH Superseded Chanwoo Choi 1 participant 2 messages Apr 27, 2015 Common clk

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 clk: Show the clock rate when fail to set clock rate

This patch shows the current clock rate when fail to set the clock rate. because original error message show the error value instead of currrent clock rate.

Cc Mike Turquette <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Sylwester Nawrocki <[email protected]>

---
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(-)
drivers/clk/clk-conf.c +2 -2
index 48a65b2..53d7449 100644
@@ -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 %ld\n",
+				       __clk_get_name(clk), rate);
 			clk_put(clk);
 		}
 		index++;
Signature · 1 line
1.8.5.5
#1 lore raw

Dear all,

Please ignore this patch. I'll send v4 patch.

Thanks,
Chanwoo Choi

Quoted 33 lines · Chanwoo Choi

This patch shows the current clock rate when fail to set the clock rate. because original error message show the error value instead of currrent clock rate.

Cc Mike Turquette <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Sylwester Nawrocki <[email protected]>

---
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(-)
drivers/clk/clk-conf.c +2 -2
index 48a65b2..53d7449 100644
@@ -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 %ld\n",
+				       __clk_get_name(clk), rate);
 			clk_put(clk);
 		}
 		index++;