mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: behanw@converseincode.com
To: hpa@zytor.com, mingo@redhat.com, tglx@linutronix.de, x86@kernel.org
Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	"Jan-Simon Möller" <dl9pf@gmx.de>,
	"Behan Webster" <behanw@converseincode.com>
Subject: [PATCH] mm: Apply the section attribute to the variable, not its type
Date: Fri,  5 Sep 2014 16:16:45 -0700	[thread overview]
Message-ID: <1409959005-11479-1-git-send-email-behanw@converseincode.com> (raw)

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


             reply	other threads:[~2014-09-05 23:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05 23:16 behanw [this message]
2014-09-09 14:54 ` [tip:x86/urgent] x86/mm: " tip-bot for Jan-Simon Möller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409959005-11479-1-git-send-email-behanw@converseincode.com \
    --to=behanw@converseincode.com \
    --cc=dl9pf@gmx.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome