Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] Fix warnings in run_uncached on 32bit 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

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

authored by

Yoichi Yuasa and committed by
Ralf Baechle
c55197eb 131c1a2b

+4
+4
arch/mips/lib/uncached.c
··· 44 44 45 45 if (sp >= (long)CKSEG0 && sp < (long)CKSEG2) 46 46 usp = CKSEG1ADDR(sp); 47 + #ifdef CONFIG_64BIT 47 48 else if ((long long)sp >= (long long)PHYS_TO_XKPHYS(0LL, 0) && 48 49 (long long)sp < (long long)PHYS_TO_XKPHYS(8LL, 0)) 49 50 usp = PHYS_TO_XKPHYS((long long)K_CALG_UNCACHED, 50 51 XKPHYS_TO_PHYS((long long)sp)); 52 + #endif 51 53 else { 52 54 BUG(); 53 55 usp = sp; 54 56 } 55 57 if (lfunc >= (long)CKSEG0 && lfunc < (long)CKSEG2) 56 58 ufunc = CKSEG1ADDR(lfunc); 59 + #ifdef CONFIG_64BIT 57 60 else if ((long long)lfunc >= (long long)PHYS_TO_XKPHYS(0LL, 0) && 58 61 (long long)lfunc < (long long)PHYS_TO_XKPHYS(8LL, 0)) 59 62 ufunc = PHYS_TO_XKPHYS((long long)K_CALG_UNCACHED, 60 63 XKPHYS_TO_PHYS((long long)lfunc)); 64 + #endif 61 65 else { 62 66 BUG(); 63 67 ufunc = lfunc;