From patchwork Fri Oct 5 19:42:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Santos X-Patchwork-Id: 1555711 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 14649DF24C for ; Fri, 5 Oct 2012 19:44:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964808Ab2JETnl (ORCPT ); Fri, 5 Oct 2012 15:43:41 -0400 Received: from nm10.bullet.mail.sp2.yahoo.com ([98.139.91.80]:23143 "HELO nm10.bullet.mail.sp2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756927Ab2JETn2 (ORCPT ); Fri, 5 Oct 2012 15:43:28 -0400 Received: from [72.30.22.92] by nm10.bullet.mail.sp2.yahoo.com with NNFMP; 05 Oct 2012 19:43:28 -0000 Received: from [98.139.44.85] by tm14.bullet.mail.sp2.yahoo.com with NNFMP; 05 Oct 2012 19:43:28 -0000 Received: from [127.0.0.1] by omp1022.access.mail.sp2.yahoo.com with NNFMP; 05 Oct 2012 19:43:28 -0000 X-Yahoo-Newman-Id: 128878.20565.bm@omp1022.access.mail.sp2.yahoo.com Received: (qmail 66086 invoked from network); 5 Oct 2012 19:43:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=att.net; s=s1024; t=1349466207; bh=Ot2V8KPSErUUbnJEVJMVq/+dSPSHuNpJ27H+43ib364=; h=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=p+RRyaUS+1tXAQidOiHm9sc/5v+nsBw15m7TVOvcZzcvnWOOgvCgvw65j+bRGduw4RALaW+Em9tasDCp6Q/xRdA6+NnRO7y6aUEP1FasphOqqQt3YyOFv/LV2qIhovl4ooAG2cC2AvWO+wufjtpe4dHUyA3QN2c/0N/nk57qL8U= Received: from localhost.localdomain (danielfsantos@99.70.244.137 with login) by smtp114.sbc.mail.ne1.yahoo.com with SMTP; 05 Oct 2012 12:43:27 -0700 PDT X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: DFbDWy4VM1mKv.zh9dY30jru3I0Y_O_RXTLWfy0HMnujdhr enMfNW7Q7lA.f1jDaJ0pvaH8Xf37yfm4QMvTofswYBBnSHCk4LrdL81lUdeP QU5dxa7ZA73vlDlpuSTuWZm75.xk2mmvd4F7PyCXB.F206ANWaC7kdquJRYL wRS5wQ3JkL37qT_YAx3VeyDKUrMN7JAMGXeKZTJWNwlbTOOUe3BpF.RAjO6w p4sAK0J4jKfs1sra4tND9qmucbj1hyWlN96vU41A4dceYGXDrJejiBmo05Fs o8qu6ZOhbCJ3HJKLENfNJ4SrBFYmIZpTJSsbPKwocyg.XC5X7IsQpKCpV3Qo 76Z8IGj3TnRnBrZMwAF9rQA8xag7nQpklvVaTaF7lMSz7SFDJ1lK9RaJOpuG alaKZPZ7e5uDyoH3VZlujaTqyaRgII9zSRno0l_ZVQWee3c8qmO4SUA-- X-Yahoo-SMTP: xXkkXk6swBBAi.5wfkIWFW3ugxbrqyhyk_b4Z25Sfu.XGQ-- From: danielfsantos@att.net 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 Subject: [PATCH v2 05/10] compiler{, -gcc4}.h, bug.h: Remove duplicate macros Date: Fri, 5 Oct 2012 14:42:44 -0500 Message-Id: <1349466169-20637-5-git-send-email-daniel.santos@pobox.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1349465759-20524-1-git-send-email-daniel.santos@pobox.com> References: <1349465759-20524-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 __linktime_error() does the same thing as __compiletime_error() and is only used in bug.h. Since the macro defines a function attribute that will cause a failure at compile-time (not link-time), it makes more sense to keep __compiletime_error(), which is also neatly mated with __compiletime_warning(). Signed-off-by: Daniel Santos Acked-by: David Rientjes --- include/linux/bug.h | 2 +- include/linux/compiler-gcc4.h | 2 -- include/linux/compiler.h | 3 --- 3 files changed, 1 insertions(+), 6 deletions(-) diff --git a/include/linux/bug.h b/include/linux/bug.h index 4bd74d8..a03c3ef 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h @@ -74,7 +74,7 @@ extern int __build_bug_on_failed; #define BUILD_BUG() \ do { \ extern void __build_bug_failed(void) \ - __linktime_error("BUILD_BUG failed"); \ + __compiletime_error("BUILD_BUG failed");\ __build_bug_failed(); \ } while (0) diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index bbfeb13..e15985b 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h @@ -33,8 +33,6 @@ the kernel context */ #define __cold __attribute__((__cold__)) -#define __linktime_error(message) __attribute__((__error__(message))) - #ifndef __CHECKER__ # define __compiletime_warning(message) __attribute__((warning(message))) # define __compiletime_error(message) __attribute__((error(message))) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index f430e41..fd455aa 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -297,9 +297,6 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); #ifndef __compiletime_error # define __compiletime_error(message) #endif -#ifndef __linktime_error -# define __linktime_error(message) -#endif /* * Prevent the compiler from merging or refetching accesses. The compiler * is also forbidden from reordering successive instances of ACCESS_ONCE(),