Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932252AbVKZPR3 (ORCPT ); Sat, 26 Nov 2005 10:17:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932254AbVKZPR3 (ORCPT ); Sat, 26 Nov 2005 10:17:29 -0500 Received: from mx3.mail.elte.hu ([157.181.1.138]:3224 "EHLO mx3.mail.elte.hu") by vger.kernel.org with ESMTP id S932252AbVKZPR2 (ORCPT ); Sat, 26 Nov 2005 10:17:28 -0500 Date: Sat, 26 Nov 2005 16:17:34 +0100 From: Ingo Molnar To: john stultz Cc: lkml , Darren Hart , Nishanth Aravamudan , Frank Sorenson , George Anzinger , Roman Zippel , Ulrich Windl , Thomas Gleixner Subject: Re: [patch] warn-on-once.patch Message-ID: <20051126151734.GA15240@elte.hu> References: <20051122013515.18537.76463.sendpatchset@cog.beaverton.ibm.com> <20051122013522.18537.97944.sendpatchset@cog.beaverton.ibm.com> <20051126145216.GB12999@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051126145216.GB12999@elte.hu> User-Agent: Mutt/1.4.2.1i X-ELTE-SpamScore: 0.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=0.0 required=5.9 tests=AWL autolearn=no SpamAssassin version=3.0.3 0.0 AWL AWL: From: address is in the auto white-list X-ELTE-VirusStatus: clean Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 975 Lines: 38 * Ingo Molnar wrote: > - introduce WARN_ON_ONCE(cond) replacement patch below - fixed bug found by Thomas Gleixner. (I've updated the gtod-B11-cleanup.tar.gz patchqueue with both this fix and the x64 fix.) Ingo include/asm-generic/bug.h | 10 ++++++++++ 1 files changed, 10 insertions(+) Index: linux/include/asm-generic/bug.h =================================================================== --- linux.orig/include/asm-generic/bug.h +++ linux/include/asm-generic/bug.h @@ -39,4 +39,14 @@ #endif #endif +#define WARN_ON_ONCE(condition) \ +do { \ + static int warn_once = 1; \ + \ + if (warn_once && (condition)) { \ + warn_once = 0; \ + WARN_ON(1); \ + } \ +} while (0); + #endif - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/