linux-mips
[Top] [All Lists]

[PATCH][MIPS] fix run_uncached warning about 32bit kernel

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH][MIPS] fix run_uncached warning about 32bit kernel
From: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Date: Tue, 6 Feb 2007 10:59:22 +0900
Cc: yoichi_yuasa@tripeaks.co.jp, linux-mips <linux-mips@linux-mips.org>
Organization: TriPeaks Corporation
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Hi Ralf,

This patch has fixed warning about 32 bit kernel.

arch/mips/lib/uncached.c: In function 'run_uncached':
arch/mips/lib/uncached.c:47: warning: comparison is always true due to limited 
range of data type
arch/mips/lib/uncached.c:48: warning: comparison is always false due to limited 
range of data type
arch/mips/lib/uncached.c:57: warning: comparison is always true due to limited 
range of data type
arch/mips/lib/uncached.c:58: warning: comparison is always false due to limited 
range of data type

Yoichi

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/lib/uncached.c 
mips/arch/mips/lib/uncached.c
--- mips-orig/arch/mips/lib/uncached.c  2006-11-13 19:32:04.002117500 +0900
+++ mips/arch/mips/lib/uncached.c       2006-11-13 19:29:07.087061000 +0900
@@ -44,20 +44,24 @@ unsigned long __init run_uncached(void *
 
        if (sp >= (long)CKSEG0 && sp < (long)CKSEG2)
                usp = CKSEG1ADDR(sp);
+#ifdef CONFIG_64BIT
        else if ((long long)sp >= (long long)PHYS_TO_XKPHYS(0LL, 0) &&
                 (long long)sp < (long long)PHYS_TO_XKPHYS(8LL, 0))
                usp = PHYS_TO_XKPHYS((long long)K_CALG_UNCACHED,
                                     XKPHYS_TO_PHYS((long long)sp));
+#endif
        else {
                BUG();
                usp = sp;
        }
        if (lfunc >= (long)CKSEG0 && lfunc < (long)CKSEG2)
                ufunc = CKSEG1ADDR(lfunc);
+#ifdef CONFIG_64BIT
        else if ((long long)lfunc >= (long long)PHYS_TO_XKPHYS(0LL, 0) &&
                 (long long)lfunc < (long long)PHYS_TO_XKPHYS(8LL, 0))
                ufunc = PHYS_TO_XKPHYS((long long)K_CALG_UNCACHED,
                                       XKPHYS_TO_PHYS((long long)lfunc));
+#endif
        else {
                BUG();
                ufunc = lfunc;

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