public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] WARN_ONCE(): use bool for boolean flag
@ 2009-09-27 13:53 Cesar Eduardo Barros
  2009-09-27 14:03 ` Daniel Walker
  0 siblings, 1 reply; 18+ messages in thread
From: Cesar Eduardo Barros @ 2009-09-27 13:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Roland Dreier, Cesar Eduardo Barros

Commit 70867453092297be9afb2249e712a1f960ec0a09 changed printk_once()
to use bool instead of int for its guard variable. Do the same change
to WARN_ONCE() and WARN_ON_ONCE(), for the same reasons.

Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
---
 include/asm-generic/bug.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 4b67559..18c435d 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -113,22 +113,22 @@ extern void warn_slowpath_null(const char *file, const int line);
 #endif
 
 #define WARN_ON_ONCE(condition)	({				\
-	static int __warned;					\
+	static bool __warned;					\
 	int __ret_warn_once = !!(condition);			\
 								\
 	if (unlikely(__ret_warn_once))				\
 		if (WARN_ON(!__warned)) 			\
-			__warned = 1;				\
+			__warned = true;			\
 	unlikely(__ret_warn_once);				\
 })
 
 #define WARN_ONCE(condition, format...)	({			\
-	static int __warned;					\
+	static bool __warned;					\
 	int __ret_warn_once = !!(condition);			\
 								\
 	if (unlikely(__ret_warn_once))				\
 		if (WARN(!__warned, format)) 			\
-			__warned = 1;				\
+			__warned = true;			\
 	unlikely(__ret_warn_once);				\
 })
 
-- 
1.6.4.4


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

end of thread, other threads:[~2009-09-30  0:38 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-27 13:53 [PATCH] WARN_ONCE(): use bool for boolean flag Cesar Eduardo Barros
2009-09-27 14:03 ` Daniel Walker
2009-09-27 15:56   ` Cesar Eduardo Barros
2009-09-27 16:52     ` Daniel Walker
2009-09-27 17:24       ` Cesar Eduardo Barros
2009-09-27 17:32         ` Daniel Walker
2009-09-27 17:48           ` Cesar Eduardo Barros
2009-09-27 18:12             ` Cesar Eduardo Barros
2009-09-27 18:25               ` [PATCH] WARN_ONCE(): use bool for condition Cesar Eduardo Barros
2009-09-27 18:28                 ` Daniel Walker
2009-09-27 18:55                   ` Cesar Eduardo Barros
2009-09-27 19:03                     ` Daniel Walker
2009-09-29 20:59                 ` Andrew Morton
2009-09-29 23:11                   ` Cesar Eduardo Barros
2009-09-29 23:12                     ` [PATCH] WARN_ONCE(): use bool for boolean flag Cesar Eduardo Barros
2009-09-30  0:17                       ` Andrew Morton
2009-09-30  0:37                         ` Cesar Eduardo Barros
2009-09-29 23:18                     ` [PATCH] WARN_ONCE(): use bool for condition Cesar Eduardo Barros

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox