You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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
+2
-1
@@ -73,6 +73,7 @@
|
||||
#include <linux/signalfd.h>
|
||||
#include <linux/uprobes.h>
|
||||
#include <linux/aio.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/pgalloc.h>
|
||||
@@ -286,7 +287,7 @@ void __init fork_init(unsigned long mempages)
|
||||
init_task.signal->rlim[RLIMIT_NPROC];
|
||||
}
|
||||
|
||||
int __attribute__((weak)) arch_dup_task_struct(struct task_struct *dst,
|
||||
int __weak arch_dup_task_struct(struct task_struct *dst,
|
||||
struct task_struct *src)
|
||||
{
|
||||
*dst = *src;
|
||||
|
||||
Reference in New Issue
Block a user