From 6240abca92704cb379171a2c1fe4d8d5fdad8599 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 6 Oct 2006 00:43:49 -0700 Subject: [PATCH] --- yaml --- r: 39034 b: refs/heads/master c: d69a892268c66c13fcb445a8274baa9d7befb7b5 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/asm-generic/bug.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 19fc64dd0acb..266fd25f3fc7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4899b8b16b302299cc91289f7b5bac295e9ab387 +refs/heads/master: d69a892268c66c13fcb445a8274baa9d7befb7b5 diff --git a/trunk/include/asm-generic/bug.h b/trunk/include/asm-generic/bug.h index a5250895155e..1d9573cf4a0b 100644 --- a/trunk/include/asm-generic/bug.h +++ b/trunk/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