aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/ksysfs.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/ksysfs.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/ksysfs.c')
-rw-r--r--kernel/ksysfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
index e660964086e2..2495a9b14ac8 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -18,6 +18,7 @@
18#include <linux/stat.h> 18#include <linux/stat.h>
19#include <linux/sched.h> 19#include <linux/sched.h>
20#include <linux/capability.h> 20#include <linux/capability.h>
21#include <linux/compiler.h>
21 22
22#include <linux/rcupdate.h> /* rcu_expedited */ 23#include <linux/rcupdate.h> /* rcu_expedited */
23 24
@@ -162,8 +163,8 @@ KERNEL_ATTR_RW(rcu_expedited);
162/* 163/*
163 * Make /sys/kernel/notes give the raw contents of our kernel .notes section. 164 * Make /sys/kernel/notes give the raw contents of our kernel .notes section.
164 */ 165 */
165extern const void __start_notes __attribute__((weak)); 166extern const void __start_notes __weak;
166extern const void __stop_notes __attribute__((weak)); 167extern const void __stop_notes __weak;
167#define notes_size (&__stop_notes - &__start_notes) 168#define notes_size (&__stop_notes - &__start_notes)
168 169
169static ssize_t notes_read(struct file *filp, struct kobject *kobj, 170static ssize_t notes_read(struct file *filp, struct kobject *kobj,