public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Alexey Dobriyan <adobriyan@gmail.com>
Subject: [PATCH v2] arm: export "W" macro just for assembly code
Date: Sun, 20 Sep 2009 21:40:12 +0200	[thread overview]
Message-ID: <20090920194012.GA22062@Chamillionaire.breakpoint.cc> (raw)
In-Reply-To: <20090918193422.GA6601@n2100.arm.linux.org.uk>

From: Alexey Dobriyan <adobriyan@gmail.com>

The W macro which got introduced in 0becb08 aka "Thumb-2: Add macros for
the unified assembler syntax" clashes with the W function in
crypto/cast6.c since commit 8b59278 aka "Thumb-2: Implement the unified
arch/arm/lib functions" due to the following include path:
|arch/arm/include/asm/unified.h <---
|arch/arm/include/asm/uaccess.h:20
|include/linux/uaccess.h:5
|include/linux/crypto.h:26
|crypto/cast6.c:23

This patch allows the usage of the new W macro only in assembly files
since it is the place where it is used.

[sebastian@breakpoint]: patch description
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
---
Russel, I've added a new patch description for this patch since my
rename edition was a little larger.

 arch/arm/include/asm/unified.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/unified.h b/arch/arm/include/asm/unified.h
index 073e85b..bc63116 100644
--- a/arch/arm/include/asm/unified.h
+++ b/arch/arm/include/asm/unified.h
@@ -35,7 +35,9 @@
 
 #define ARM(x...)
 #define THUMB(x...)	x
+#ifdef __ASSEMBLY__
 #define W(instr)	instr.w
+#endif
 #define BSYM(sym)	sym + 1
 
 #else	/* !CONFIG_THUMB2_KERNEL */
@@ -45,7 +47,9 @@
 
 #define ARM(x...)	x
 #define THUMB(x...)
+#ifdef __ASSEMBLY__
 #define W(instr)	instr
+#endif
 #define BSYM(sym)	sym
 
 #endif	/* CONFIG_THUMB2_KERNEL */


  reply	other threads:[~2009-09-20 19:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-17  9:12 [PATCH] Fix "W" macro in arch/arm/include/asm/unified.h Catalin Marinas
2009-09-18 19:34 ` Russell King - ARM Linux
2009-09-20 19:40   ` Sebastian Andrzej Siewior [this message]
2009-09-21 11:41     ` [PATCH v2] arm: export "W" macro just for assembly code Catalin Marinas
2009-09-21 11:42       ` Russell King - ARM Linux

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=20090920194012.GA22062@Chamillionaire.breakpoint.cc \
    --to=sebastian@breakpoint.cc \
    --cc=adobriyan@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=torvalds@linux-foundation.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