Skip to contentSkip to conversation

clk: Show correct information when fail to set clock rate

PATCH In review Chanwoo Choi 3 participants 4 messages Apr 27, 2015 – May 15, 2015 Common clk

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 clk: Show correct information when fail to set clock rate

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 <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Sylwester Nawrocki <[email protected]>

---
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(-)
drivers/clk/clk-conf.c +2 -2
index 48a65b2..000692b 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 %d (%d), current rate: %ld\n",
+				       __clk_get_name(clk), rate, rc, clk_get_rate(clk));
 			clk_put(clk);
 		}
 		index++;
Signature · 1 line
1.8.5.5
#1 lore raw
Quoted 9 lines · Chanwoo Choi

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 <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Sylwester Nawrocki <[email protected]>

---

Seems fine to me. Sylwester?

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
#2 lore raw
Quoted 5 lines · Stephen Boyd
Quoted 4 lines · Chanwoo Choi
Quoted 4 lines

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.

Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Cc Mike Turquette <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Sylwester Nawrocki <[email protected]>

---

Seems fine to me. Sylwester?

I'm fine with that too.

--
Thanks,
Sylwester

#3 lore raw
Quoted 12 lines · Sylwester Nawrocki
Quoted 11 lines · Stephen Boyd
Quoted 9 lines · Chanwoo Choi
Quoted 9 lines

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 <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Sylwester Nawrocki <[email protected]>

---

Quoted 6 lines
Quoted 1 line

Seems fine to me. Sylwester?

I'm fine with that too.

Thanks. Applied to clk-next.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project