linux-mips
[Top] [All Lists]

Re: [PATCH] Use "long" for 64-bit values on 64-bit kernel.

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [PATCH] Use "long" for 64-bit values on 64-bit kernel.
From: David Daney <ddaney@avtrex.com>
Date: Thu, 19 Oct 2006 08:27:45 -0700
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <20061019.231645.126573493.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20061019.231645.126573493.anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929)
Atsushi Nemoto wrote:
Just resend again to avoid being obscured by discussion.

This would get rid of some warnings about "long" vs. "long long".

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

diff --git a/include/asm-mips/addrspace.h b/include/asm-mips/addrspace.h
index 45c706e..7401711 100644
--- a/include/asm-mips/addrspace.h
+++ b/include/asm-mips/addrspace.h
@@ -19,12 +19,17 @@ #ifdef __ASSEMBLY__
 #define _ATYPE_
 #define _ATYPE32_
 #define _ATYPE64_
-#define _LLCONST_(x)   x
+#define _CONST64_(x)   x
 #else
 #define _ATYPE_                __PTRDIFF_TYPE__
 #define _ATYPE32_      int
+#ifdef CONFIG_64BIT
+#define _ATYPE64_      long
+#define _CONST64_(x)   x ## L
+#else
 #define _ATYPE64_      long long
-#define _LLCONST_(x)   x ## LL
+#define _CONST64_(x)   x ## LL
+#endif
 #endif

This duplicates the things in asm-mips/types.h. Is there some reason that we cannot use s64/u64 instead of long/long long?


David Daney.

<Prev in Thread] Current Thread [Next in Thread>