All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: h8300: Fix signness bug
@ 2015-06-20  7:27 Axel Lin
  2015-06-22 23:04 ` Stephen Boyd
  0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2015-06-20  7:27 UTC (permalink / raw)
  To: Mike Turquette, Stephen Boyd; +Cc: Yoshinori Sato, uclinux-h8-devel, linux-clk

of_clk_get_parent_count() may return negative error code, so num_parents
needs to be int rather than unsigned int.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/clk/h8300/clk-div.c     | 2 +-
 drivers/clk/h8300/clk-h8s2678.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/h8300/clk-div.c b/drivers/clk/h8300/clk-div.c
index 56f9eba..e13d5c3 100644
--- a/drivers/clk/h8300/clk-div.c
+++ b/drivers/clk/h8300/clk-div.c
@@ -15,7 +15,7 @@ static DEFINE_SPINLOCK(clklock);
 
 static void __init h8300_div_clk_setup(struct device_node *node)
 {
-	unsigned int num_parents;
+	int num_parents;
 	struct clk *clk;
 	const char *clk_name = node->name;
 	const char *parent_name;
diff --git a/drivers/clk/h8300/clk-h8s2678.c b/drivers/clk/h8300/clk-h8s2678.c
index 4701b093..26c07aa 100644
--- a/drivers/clk/h8300/clk-h8s2678.c
+++ b/drivers/clk/h8300/clk-h8s2678.c
@@ -84,7 +84,7 @@ static const struct clk_ops pll_ops = {
 
 static void __init h8s2678_pll_clk_setup(struct device_node *node)
 {
-	unsigned int num_parents;
+	int num_parents;
 	struct clk *clk;
 	const char *clk_name = node->name;
 	const char *parent_name;
-- 
2.1.0

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

end of thread, other threads:[~2015-07-14  0:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-20  7:27 [PATCH] clk: h8300: Fix signness bug Axel Lin
2015-06-22 23:04 ` Stephen Boyd
2015-07-07  5:01   ` Axel Lin
2015-07-14  0:22     ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.