From: Daniel Sanders <daniel.sanders@imgtec.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Toma Tabacu <toma.tabacu@imgtec.com>,
Daniel Sanders <daniel.sanders@imgtec.com>,
Ralf Baechle <ralf@linux-mips.org>,
Markos Chandras <markos.chandras@imgtec.com>,
Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>,
<linux-mips@linux-mips.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/5] MIPS: LLVMLinux: Fix an 'inline asm input/output type mismatch' error.
Date: Tue, 3 Feb 2015 13:37:17 +0000 [thread overview]
Message-ID: <1422970639-7922-4-git-send-email-daniel.sanders@imgtec.com> (raw)
In-Reply-To: <1422970639-7922-1-git-send-email-daniel.sanders@imgtec.com>
From: Toma Tabacu <toma.tabacu@imgtec.com>
Change the type of csum_ipv6_magic's 'proto' argument from unsigned
short to __u32.
This fixes a type mismatch between the 'htonl(proto)' inline asm
input, which is __u32, and the 'proto' output, which is unsigned
short.
This is the error message reported by clang:
arch/mips/include/asm/checksum.h:285:27: error: unsupported inline asm: input with type '__be32' (aka 'unsigned int') matching output with type 'unsigned short'
"0" (htonl(len)), "1" (htonl(proto)), "r" (sum));
^~~~~~~~~~~~
The changed code can be compiled successfully by both gcc and clang.
Signed-off-by: Toma Tabacu <toma.tabacu@imgtec.com>
Signed-off-by: Daniel Sanders <daniel.sanders@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
---
arch/mips/include/asm/checksum.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/include/asm/checksum.h b/arch/mips/include/asm/checksum.h
index 3418c51..683b9e7 100644
--- a/arch/mips/include/asm/checksum.h
+++ b/arch/mips/include/asm/checksum.h
@@ -225,7 +225,7 @@ static inline __sum16 ip_compute_csum(const void *buff, int len)
#define _HAVE_ARCH_IPV6_CSUM
static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
const struct in6_addr *daddr,
- __u32 len, unsigned short proto,
+ __u32 len, __u32 proto,
__wsum sum)
{
__asm__(
--
2.1.4
next prev parent reply other threads:[~2015-02-03 13:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 13:37 [PATCH 0/5] MIPS: LLVMLinux: Patches to enable compilation of a working kernel for MIPS using Clang/LLVM Daniel Sanders
2015-02-03 13:37 ` [PATCH 1/5] LLVMLinux: Correct size_index table before replacing the bootstrap kmem_cache_node Daniel Sanders
2015-02-03 15:14 ` Christoph Lameter
2015-02-03 16:00 ` Daniel Sanders
2015-02-04 20:52 ` [PATCH v2 " Daniel Sanders
2015-02-04 21:06 ` [PATCH v3 1/5] slab: " Daniel Sanders
2015-02-05 8:37 ` Pekka Enberg
2015-02-04 19:33 ` [PATCH 1/5] LLVMLinux: " Pekka Enberg
2015-02-04 20:38 ` Daniel Sanders
2015-02-04 20:42 ` Pekka Enberg
2015-02-04 21:08 ` Daniel Sanders
2015-02-03 13:37 ` [PATCH 2/5] MIPS: LLVMLinux: Fix a 'cast to type not present in union' error Daniel Sanders
2015-02-03 13:37 ` Daniel Sanders [this message]
2015-02-04 12:57 ` [PATCH 3/5] MIPS: LLVMLinux: Fix an 'inline asm input/output type mismatch' error Maciej W. Rozycki
2015-02-05 15:43 ` Daniel Sanders
2015-02-06 10:09 ` Maciej W. Rozycki
2015-02-09 11:33 ` [PATCH v2 " Daniel Sanders
2015-02-09 14:12 ` Maciej W. Rozycki
2015-02-09 16:44 ` [PATCH v3 " Daniel Sanders
2015-02-03 13:37 ` [PATCH 4/5] MIPS: LLVMLinux: Silence variable self-assignment warnings Daniel Sanders
2015-02-03 13:37 ` [PATCH 5/5] MIPS: LLVMLinux: Silence unicode warnings when preprocessing assembly Daniel Sanders
2015-02-04 10:36 ` Maciej W. Rozycki
2015-02-05 10:25 ` Toma Tabacu
2015-02-05 12:35 ` Maciej W. Rozycki
2015-02-05 12:56 ` Måns Rullgård
2015-02-11 17:37 ` Daniel Sanders
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=1422970639-7922-4-git-send-email-daniel.sanders@imgtec.com \
--to=daniel.sanders@imgtec.com \
--cc=Leonid.Yegoshin@imgtec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=markos.chandras@imgtec.com \
--cc=ralf@linux-mips.org \
--cc=toma.tabacu@imgtec.com \
/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;
as well as URLs for NNTP newsgroup(s).