[MIPS] Fix warnings in run_uncached on 32bit kernel
authorYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Tue, 6 Feb 2007 01:59:22 +0000 (10:59 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 6 Feb 2007 16:53:24 +0000 (16:53 +0000)
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

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/lib/uncached.c

index 98ce89f8068b9aa5c8ef6bbbf56cf42c9bca39a9..2388f7f3ffde9c2bffd45744f9f8adaacfd10048 100644 (file)
@@ -44,20 +44,24 @@ unsigned long __init run_uncached(void *func)
 
        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;