summaryrefslogtreecommitdiffstats
path: root/include/asm-generic/bug.h
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-10-11 04:59:46 -0400
committerJeff Garzik <jeff@garzik.org>2006-10-11 04:59:46 -0400
commit701328a7b58d50d8640c21ba5fdf3170b1ddac16 (patch)
tree99a3fe44310a97e92ad1cb3a01f2ee3f6ed0d59a /include/asm-generic/bug.h
parent53e36ada37cb8b01cfbf674580a79edc0bb764c7 (diff)
parent53a5fbdc2dff55161a206ed1a1385a8fa8055c34 (diff)
downloadblackbird-op-linux-701328a7b58d50d8640c21ba5fdf3170b1ddac16.tar.gz
blackbird-op-linux-701328a7b58d50d8640c21ba5fdf3170b1ddac16.zip
Merge branch 'master' into upstream-fixes
Diffstat (limited to 'include/asm-generic/bug.h')
-rw-r--r--include/asm-generic/bug.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index a5250895155e..1d9573cf4a0b 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -41,14 +41,14 @@
#endif
#endif
-#define WARN_ON_ONCE(condition) ({ \
- static int __warn_once = 1; \
- typeof(condition) __ret_warn_once = (condition);\
- \
- if (likely(__warn_once)) \
- if (WARN_ON(__ret_warn_once)) \
- __warn_once = 0; \
- unlikely(__ret_warn_once); \
+#define WARN_ON_ONCE(condition) ({ \
+ static int __warned; \
+ typeof(condition) __ret_warn_once = (condition); \
+ \
+ if (unlikely(__ret_warn_once)) \
+ if (WARN_ON(!__warned)) \
+ __warned = 1; \
+ unlikely(__ret_warn_once); \
})
#ifdef CONFIG_SMP
OpenPOWER on IntegriCloud