* [PATCH] mm: Apply the section attribute to the variable, not its type
@ 2014-09-05 23:16 behanw
2014-09-09 14:54 ` [tip:x86/urgent] x86/mm: " tip-bot for Jan-Simon Möller
0 siblings, 1 reply; 2+ messages in thread
From: behanw @ 2014-09-05 23:16 UTC (permalink / raw)
To: hpa, mingo, tglx, x86
Cc: linux-kernel, torvalds, Jan-Simon Möller, Behan Webster
From: Jan-Simon Möller <dl9pf@gmx.de>
This fixes a compilation error in clang in that a linker section attribute
can't be added to a type.
arch/x86/mm/mmap.c:34:8: error: '__section__' attribute only applies to functions and global variables
struct __read_mostly va_alignment va_align = {
^
arch/x86/include/asm/cache.h:10:38: note: expanded from macro '__read_mostly'
#define __read_mostly __attribute__((__section__(".data..read_mostly")))
^
1 error generated.
By moving the section attribute to the variable declaration, the desired effect
is acheived.
Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de>
Signed-off-by: Behan Webster <behanw@converseincode.com>
---
arch/x86/mm/mmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
index 25e7e13..919b912 100644
--- a/arch/x86/mm/mmap.c
+++ b/arch/x86/mm/mmap.c
@@ -31,7 +31,7 @@
#include <linux/sched.h>
#include <asm/elf.h>
-struct __read_mostly va_alignment va_align = {
+struct va_alignment __read_mostly va_align = {
.flags = -1,
};
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip:x86/urgent] x86/mm: Apply the section attribute to the variable, not its type
2014-09-05 23:16 [PATCH] mm: Apply the section attribute to the variable, not its type behanw
@ 2014-09-09 14:54 ` tip-bot for Jan-Simon Möller
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Jan-Simon Möller @ 2014-09-09 14:54 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, torvalds, dl9pf, behanw, akpm, tglx
Commit-ID: cc99535eb4049c730cac421d403d079593cb31ae
Gitweb: http://git.kernel.org/tip/cc99535eb4049c730cac421d403d079593cb31ae
Author: Jan-Simon Möller <dl9pf@gmx.de>
AuthorDate: Fri, 5 Sep 2014 16:16:45 -0700
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 9 Sep 2014 07:13:39 +0200
x86/mm: Apply the section attribute to the variable, not its type
This fixes a compilation error in clang in that a linker section
attribute can't be added to a type:
arch/x86/mm/mmap.c:34:8: error: '__section__' attribute only applies to functions and global variables struct __read_mostly
...
By moving the section attribute to the variable declaration, the
desired effect is achieved.
Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de>
Signed-off-by: Behan Webster <behanw@converseincode.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/1409959005-11479-1-git-send-email-behanw@converseincode.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/mm/mmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
index 25e7e13..919b912 100644
--- a/arch/x86/mm/mmap.c
+++ b/arch/x86/mm/mmap.c
@@ -31,7 +31,7 @@
#include <linux/sched.h>
#include <asm/elf.h>
-struct __read_mostly va_alignment va_align = {
+struct va_alignment __read_mostly va_align = {
.flags = -1,
};
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-09 14:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-05 23:16 [PATCH] mm: Apply the section attribute to the variable, not its type behanw
2014-09-09 14:54 ` [tip:x86/urgent] x86/mm: " tip-bot for Jan-Simon Möller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox