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>
Этот коммит содержится в:

коммит произвёл
Linus Torvalds

родитель
ce816fa88c
Коммит
52f5684c8e
@@ -2,6 +2,7 @@
|
||||
#include <linux/suspend_ioctls.h>
|
||||
#include <linux/utsname.h>
|
||||
#include <linux/freezer.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
struct swsusp_info {
|
||||
struct new_utsname uts;
|
||||
@@ -11,7 +12,7 @@ struct swsusp_info {
|
||||
unsigned long image_pages;
|
||||
unsigned long pages;
|
||||
unsigned long size;
|
||||
} __attribute__((aligned(PAGE_SIZE)));
|
||||
} __aligned(PAGE_SIZE);
|
||||
|
||||
#ifdef CONFIG_HIBERNATION
|
||||
/* kernel/power/snapshot.c */
|
||||
|
Ссылка в новой задаче
Block a user