From 772e541dd6d757da60b906a3052899d657348ee0 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 29 Jun 2007 09:41:09 +0000 Subject: [PATCH] Fix of WARN_ON_ONCE() braindamage git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@139 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst_debug.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scst/include/scst_debug.h b/scst/include/scst_debug.h index c0fffd49c..e9ba2b6c3 100644 --- a/scst/include/scst_debug.h +++ b/scst/include/scst_debug.h @@ -72,7 +72,10 @@ typeof(condition) __ret_warn_once = (condition); \ \ if (unlikely(__ret_warn_once)) \ - __warned = 1; \ + if (!__warned) { \ + WARN_ON(1); \ + __warned = 1; \ + } \ unlikely(__ret_warn_once); \ }) #endif