From: Ralf Baechle <ralf@linux-mips.org>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: vagabon.xyz@gmail.com, fbuihuu@gmail.com, linux-mips@linux-mips.org
Subject: Re: [PATCH 3/3] signal.c: fix gcc warning on 32 bits kernel
Date: Tue, 13 Feb 2007 02:05:56 +0000 [thread overview]
Message-ID: <20070213020556.GA5875@linux-mips.org> (raw)
In-Reply-To: <20070213014345.GA30988@linux-mips.org>
On Tue, Feb 13, 2007 at 01:43:45AM +0000, Ralf Baechle wrote:
> Well, I reverted that the old state of a warning is definately preferable
> until we found a proper solution.
Type-punning should do the trick.
Ralf
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h
index c12ebc5..36b3a42 100644
--- a/include/asm-mips/uaccess.h
+++ b/include/asm-mips/uaccess.h
@@ -265,7 +265,10 @@ do { \
*/
#define __get_user_asm_ll32(val, addr) \
{ \
- unsigned long long __gu_tmp; \
+ union { \
+ unsigned long long l; \
+ __typeof__(*(addr)) t; \
+ } __gu_tmp; \
\
__asm__ __volatile__( \
"1: lw %1, (%3) \n" \
@@ -281,9 +284,10 @@ do { \
" " __UA_ADDR " 1b, 4b \n" \
" " __UA_ADDR " 2b, 4b \n" \
" .previous \n" \
- : "=r" (__gu_err), "=&r" (__gu_tmp) \
+ : "=r" (__gu_err), "=&r" (__gu_tmp.l) \
: "0" (0), "r" (addr), "i" (-EFAULT)); \
- (val) = (__typeof__(*(addr))) __gu_tmp; \
+ \
+ (val) = __gu_tmp.t; \
}
/*
next prev parent reply other threads:[~2007-02-13 11:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-09 15:07 [PATCH 0/3] More signal clean up Franck Bui-Huu
2007-02-09 15:07 ` [PATCH 1/3] signal: avoid useless test in do_signal() Franck Bui-Huu
2007-02-09 16:21 ` Ralf Baechle
2007-02-09 16:50 ` Franck Bui-Huu
2007-02-09 15:07 ` [PATCH 2/3] signals: make common _BLOCKABLE macro Franck Bui-Huu
2007-02-13 1:39 ` Ralf Baechle
2007-02-09 15:07 ` [PATCH 3/3] signal.c: fix gcc warning on 32 bits kernel Franck Bui-Huu
2007-02-09 16:18 ` Atsushi Nemoto
2007-02-09 16:34 ` Franck Bui-Huu
2007-02-09 21:00 ` Ralf Baechle
2007-02-12 9:01 ` Franck Bui-Huu
2007-02-12 14:04 ` Ralf Baechle
2007-02-12 15:25 ` Atsushi Nemoto
2007-02-13 1:43 ` Ralf Baechle
2007-02-13 2:05 ` Ralf Baechle [this message]
2007-02-13 17:17 ` Franck Bui-Huu
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=20070213020556.GA5875@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=anemo@mba.ocn.ne.jp \
--cc=fbuihuu@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=vagabon.xyz@gmail.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