From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: linux-sh@vger.kernel.org
Subject: [PATCH] sh: simplify WARN usage in SH clock driver
Date: Tue, 04 May 2010 14:15:09 +0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1005041613210.4925@axis700.grange> (raw)
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/sh/clk.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/sh/clk.c b/drivers/sh/clk.c
index f8c1740..b0cfb75 100644
--- a/drivers/sh/clk.c
+++ b/drivers/sh/clk.c
@@ -163,12 +163,9 @@ void propagate_rate(struct clk *tclk)
static void __clk_disable(struct clk *clk)
{
- if (clk->usecount = 0) {
- printk(KERN_ERR "Trying disable clock %s with 0 usecount\n",
- clk->name);
- WARN_ON(1);
+ if (WARN(!clk->usecount, "Trying to disable clock %s with 0 usecount\n",
+ clk->name))
return;
- }
if (!(--clk->usecount)) {
if (likely(clk->ops && clk->ops->disable))
--
1.6.2.4
next reply other threads:[~2010-05-04 14:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 14:15 Guennadi Liakhovetski [this message]
2010-05-13 8:50 ` [PATCH] sh: simplify WARN usage in SH clock driver Paul Mundt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.1005041613210.4925@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).