Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932783Ab2JETpA (ORCPT ); Fri, 5 Oct 2012 15:45:00 -0400 Received: from nm29-vm0.bullet.mail.sp2.yahoo.com ([98.139.91.236]:32462 "HELO nm29-vm0.bullet.mail.sp2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756752Ab2JETn2 (ORCPT ); Fri, 5 Oct 2012 15:43:28 -0400 X-Yahoo-Newman-Id: 903934.7496.bm@omp1015.access.mail.sp2.yahoo.com 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2320 Lines: 62 __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(), -- 1.7.3.4 -- 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/