linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sh: simplify WARN usage in SH clock driver
@ 2010-05-04 14:15 Guennadi Liakhovetski
  2010-05-13  8:50 ` Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: Guennadi Liakhovetski @ 2010-05-04 14:15 UTC (permalink / raw)
  To: linux-sh

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


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

* Re: [PATCH] sh: simplify WARN usage in SH clock driver
  2010-05-04 14:15 [PATCH] sh: simplify WARN usage in SH clock driver Guennadi Liakhovetski
@ 2010-05-13  8:50 ` Paul Mundt
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2010-05-13  8:50 UTC (permalink / raw)
  To: linux-sh

On Tue, May 04, 2010 at 04:15:09PM +0200, Guennadi Liakhovetski wrote:
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
>  drivers/sh/clk.c |    7 ++-----
>  1 files changed, 2 insertions(+), 5 deletions(-)
> 
Applied, thanks.

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

end of thread, other threads:[~2010-05-13  8:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 14:15 [PATCH] sh: simplify WARN usage in SH clock driver Guennadi Liakhovetski
2010-05-13  8:50 ` Paul Mundt

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).