From mboxrd@z Thu Jan 1 00:00:00 1970 From: danielfsantos@att.net Subject: [PATCH v2 08/10] bug.h: Fix BUILD_BUG_ON macro in __CHECKER__ Date: Fri, 5 Oct 2012 14:42:47 -0500 Message-ID: <1349466169-20637-8-git-send-email-daniel.santos@pobox.com> References: <1349465759-20524-1-git-send-email-daniel.santos@pobox.com> Return-path: In-Reply-To: <1349465759-20524-1-git-send-email-daniel.santos@pobox.com> Sender: linux-kernel-owner@vger.kernel.org To: LKML Cc: Andi Kleen , Andrea Arcangeli , Andrew Morton , Borislav Petkov , Christopher Li , David Daney , David Howells , David Rientjes , Joe Perches , Konstantin Khlebnikov , linux-sparse@vger.kernel.org, Michel Lespinasse , Paul Gortmaker , Pavel Pisa , Peter Zijlstra , Steven Rostedt , Daniel Santos List-Id: linux-sparse@vger.kernel.org When __CHECKER__ is defined, we disable all of the BUILD_BUG.* macros. However, BUILD_BUG_ON was evaluating to nothing in this case, and we want (0) since this is a function-like macro that will be followed by a semicolon. Signed-off-by: Daniel Santos --- include/linux/bug.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/bug.h b/include/linux/bug.h index f8eae31..1b43ea2 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h @@ -16,7 +16,7 @@ struct pt_regs; #define BUILD_BUG_ON_NOT_POWER_OF_2(n) #define BUILD_BUG_ON_ZERO(e) (0) #define BUILD_BUG_ON_NULL(e) ((void*)0) -#define BUILD_BUG_ON(condition) +#define BUILD_BUG_ON(condition) (0) #define BUILD_BUG() (0) #else /* __CHECKER__ */ -- 1.7.3.4