From patchwork Tue Jan 1 22:54:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Santos X-Patchwork-Id: 1922501 Return-Path: X-Original-To: patchwork-linux-sparse@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id CFF73DF2A2 for ; Tue, 1 Jan 2013 22:55:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752548Ab3AAWyd (ORCPT ); Tue, 1 Jan 2013 17:54:33 -0500 Received: from nm16-vm0.access.bullet.mail.mud.yahoo.com ([66.94.236.19]:38951 "EHLO nm16-vm0.access.bullet.mail.mud.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752528Ab3AAWy1 (ORCPT ); Tue, 1 Jan 2013 17:54:27 -0500 Received: from [66.94.237.198] by nm16.access.bullet.mail.mud.yahoo.com with NNFMP; 01 Jan 2013 22:54:25 -0000 Received: from [98.139.221.54] by tm9.access.bullet.mail.mud.yahoo.com with NNFMP; 01 Jan 2013 22:54:25 -0000 Received: from [127.0.0.1] by smtp107.sbc.mail.bf1.yahoo.com with NNFMP; 01 Jan 2013 22:54:25 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=att.net; s=s1024; t=1357080865; bh=oTFR+VhpKR0lN+biHRFfnpLDuXCoiwB1uUG1evFD61s=; h=X-Yahoo-Newman-Id:Received:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References; b=0TRb+68ypIBfehmAs5hhKiAR005uGkv/cXQLDlnBw9BhjKm/LB5q6xvQxPeWN9bn7q4ml5Bwm2pTTtV3sNNCOa3Qs/qPbWxhJMGd944BBMIvXm1yAVrmTkOK4J3LzepMRFiqJrU85G2W22p98qEhTsRQaZ2BolgI8OJeA8BQ26Q= X-Yahoo-Newman-Id: 175755.18166.bm@smtp107.sbc.mail.bf1.yahoo.com Received: from localhost.localdomain (danielfsantos@99.70.244.137 with login) by smtp107.sbc.mail.bf1.yahoo.com with SMTP; 01 Jan 2013 14:54:25 -0800 PST X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: uqmCNE0VM1kxN5pVrPloNe6dBcxF_wpYmqVP3yn4pWybB1j wr_8RSoZRQtqC.waxe764W2WXvACJOv5QjWufhFK4rfB8ctn07HnV9xXPf6L NYWsEEhAQ3TrTHYWVyxFj.1ibjosUzGoAwYhABd0Dr4N4KIrJFqkV47Zqeq6 oC5c4V66oUmiNfba0OZn0Ggcct9kWKTIhWweaXQf4lQXRuKcrualESlFGea. ewlg7UL9lazDUh.6AEEH76A0Im28D7QAPqAQfzNMA4jIFFNd_tJmO_q45DtT zvn5t7X9QPyD_dgXqMdzDAXJeusFm_MgKoMwuspOqVY4i0TrDp6MzE_3iRkl .RHaQmJQcAiAZAtVKXWF.eWtD348El1Hh9qNfDc3jlNjdXxSkd5sli_rdRlb zNw9Nr6M_GOITubYDnJQgzG2PbjWEURykH8iQgZ8fW_fV.sKWUTFMoA-- X-Yahoo-SMTP: xXkkXk6swBBAi.5wfkIWFW3ugxbrqyhyk_b4Z25Sfu.XGQ-- From: danielfsantos@att.net To: LKML , Andi Kleen , Andrea Arcangeli , Andrew Morton , Borislav Petkov , Christopher Li , David Daney , David Rientjes , Joe Perches , Josh Triplett , linux-sparse@vger.kernel.org, Michel Lespinasse , Paul Gortmaker , Peter Zijlstra , Steven Rostedt Cc: Daniel Santos Subject: [PATCH v8 5/9] bug.h: Fix BUILD_BUG_ON macro in __CHECKER__ Date: Tue, 1 Jan 2013 16:54:07 -0600 Message-Id: <1357080851-30938-6-git-send-email-daniel.santos@pobox.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1357080851-30938-1-git-send-email-daniel.santos@pobox.com> References: <1348874411-28288-1-git-send-email-daniel.santos@pobox.com> <1357080851-30938-1-git-send-email-daniel.santos@pobox.com> Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org When __CHECKER__ is defined, we disable all of the BUILD_BUG.* macros. However, both BUILD_BUG_ON_NOT_POWER_OF_2 and 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 Acked-by: Borislav Petkov --- include/linux/bug.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/bug.h b/include/linux/bug.h index 2a11774..27d404f 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h @@ -12,11 +12,11 @@ enum bug_trap_type { struct pt_regs; #ifdef __CHECKER__ -#define BUILD_BUG_ON_NOT_POWER_OF_2(n) +#define BUILD_BUG_ON_NOT_POWER_OF_2(n) (0) #define BUILD_BUG_ON_ZERO(e) (0) #define BUILD_BUG_ON_NULL(e) ((void*)0) #define BUILD_BUG_ON_INVALID(e) (0) -#define BUILD_BUG_ON(condition) +#define BUILD_BUG_ON(condition) (0) #define BUILD_BUG() (0) #else /* __CHECKER__ */