aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kexec.c
diff options
context:
space:
mode:
authorGideon Israel Dsouza <gidisrael@gmail.com>2014-04-07 18:39:20 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-07 19:36:11 -0400
commit52f5684c8e1ec7463192aba8e2916df49807511a (patch)
treef8e6061de05014e89e58638f626831f2c38af971 /kernel/kexec.c
parentce816fa88cca083c47ab9000b2138a83043a78be (diff)
kernel: use macros from compiler.h instead of __attribute__((...))
To increase compiler portability there is <linux/compiler.h> which provides convenience macros for various gcc constructs. Eg: __weak for __attribute__((weak)). I've replaced all instances of gcc attributes with the right macro in the kernel subsystem. Signed-off-by: Gideon Israel Dsouza <gidisrael@gmail.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kexec.c')
-rw-r--r--kernel/kexec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index c0d261c7db7b..c8380ad203bc 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -32,6 +32,7 @@
32#include <linux/vmalloc.h> 32#include <linux/vmalloc.h>
33#include <linux/swap.h> 33#include <linux/swap.h>
34#include <linux/syscore_ops.h> 34#include <linux/syscore_ops.h>
35#include <linux/compiler.h>
35 36
36#include <asm/page.h> 37#include <asm/page.h>
37#include <asm/uaccess.h> 38#include <asm/uaccess.h>
@@ -1551,10 +1552,10 @@ void vmcoreinfo_append_str(const char *fmt, ...)
1551 * provide an empty default implementation here -- architecture 1552 * provide an empty default implementation here -- architecture
1552 * code may override this 1553 * code may override this
1553 */ 1554 */
1554void __attribute__ ((weak)) arch_crash_save_vmcoreinfo(void) 1555void __weak arch_crash_save_vmcoreinfo(void)
1555{} 1556{}
1556 1557
1557unsigned long __attribute__ ((weak)) paddr_vmcoreinfo_note(void) 1558unsigned long __weak paddr_vmcoreinfo_note(void)
1558{ 1559{
1559 return __pa((unsigned long)(char *)&vmcoreinfo_note); 1560 return __pa((unsigned long)(char *)&vmcoreinfo_note);
1560} 1561}