diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/bug.h | 16 |
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 @@ | |||
41 | #endif | 41 | #endif |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | #define WARN_ON_ONCE(condition) ({ \ | 44 | #define WARN_ON_ONCE(condition) ({ \ |
45 | static int __warn_once = 1; \ | 45 | static int __warned; \ |
46 | typeof(condition) __ret_warn_once = (condition);\ | 46 | typeof(condition) __ret_warn_once = (condition); \ |
47 | \ | 47 | \ |
48 | if (likely(__warn_once)) \ | 48 | if (unlikely(__ret_warn_once)) \ |
49 | if (WARN_ON(__ret_warn_once)) \ | 49 | if (WARN_ON(!__warned)) \ |
50 | __warn_once = 0; \ | 50 | __warned = 1; \ |
51 | unlikely(__ret_warn_once); \ | 51 | unlikely(__ret_warn_once); \ |
52 | }) | 52 | }) |
53 | 53 | ||
54 | #ifdef CONFIG_SMP | 54 | #ifdef CONFIG_SMP |