[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191226221354.11957-1-sboyd@kernel.org>
Date: Thu, 26 Dec 2019 14:13:54 -0800
From: Stephen Boyd <sboyd@...nel.org>
To: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org,
Jerome Brunet <jbrunet@...libre.com>,
Guenter Roeck <linux@...ck-us.net>
Subject: [PATCH] clk: Warn about critical clks that fail to enable
If we don't warn here users of the CLK_IS_CRITICAL flag may not know
that their clk isn't actually enabled because it silently fails to
enable. Let's drop a big WARN_ON in that case so developers find these
problems faster.
Suggested-by: Jerome Brunet <jbrunet@...libre.com>
Cc: Guenter Roeck <linux@...ck-us.net>
Signed-off-by: Stephen Boyd <sboyd@...nel.org>
---
I suspect that this may start warning for other users. Let's see
and revert in case it doesn't work.
drivers/clk/clk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 772258de2d1f..6a9a66dfdeaa 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -3427,13 +3427,13 @@ static int __clk_core_init(struct clk_core *core)
unsigned long flags;
ret = clk_core_prepare(core);
- if (ret)
+ if (WARN_ON(ret))
goto out;
flags = clk_enable_lock();
ret = clk_core_enable(core);
clk_enable_unlock(flags);
- if (ret) {
+ if (WARN_ON(ret)) {
clk_core_unprepare(core);
goto out;
}
base-commit: 12ead77432f2ce32dea797742316d15c5800cb32
--
Sent by a computer, using git, on the internet
Powered by blists - more mailing lists