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>
This commit is contained in:

committed by
Linus Torvalds

parent
ce816fa88c
commit
52f5684c8e
@@ -27,6 +27,7 @@
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/mmu_context.h>
|
||||
@@ -155,7 +156,7 @@ static inline void free_image_page(void *addr, int clear_nosave_free)
|
||||
struct linked_page {
|
||||
struct linked_page *next;
|
||||
char data[LINKED_PAGE_DATA_SIZE];
|
||||
} __attribute__((packed));
|
||||
} __packed;
|
||||
|
||||
static inline void
|
||||
free_list_of_pages(struct linked_page *list, int clear_page_nosave)
|
||||
|
Reference in New Issue
Block a user