From mboxrd@z Thu Jan 1 00:00:00 1970 From: danielfsantos@att.net Subject: [PATCH v6 4/9] compiler{,-gcc4}.h, bug.h: Remove duplicate macros Date: Tue, 20 Nov 2012 15:05:02 -0600 Message-ID: <1353445507-7233-4-git-send-email-daniel.santos@pobox.com> References: <1353444132-6809-1-git-send-email-daniel.santos@pobox.com> Return-path: Received: from nm27-vm0.access.bullet.mail.mud.yahoo.com ([66.94.236.227]:22444 "EHLO nm27-vm0.access.bullet.mail.mud.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753257Ab2KTVFS (ORCPT ); Tue, 20 Nov 2012 16:05:18 -0500 In-Reply-To: <1353444132-6809-1-git-send-email-daniel.santos@pobox.com> Sender: linux-sparse-owner@vger.kernel.org List-Id: linux-sparse@vger.kernel.org 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 __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 Acked-by: Borislav Petkov --- 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 aaac4bb..298a916 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h @@ -73,7 +73,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 9755029..7f143ac 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)))