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

sparc64: Kill annoying warning when building compat_binfmt_elf.o

GCC warns because some tests against 32-bit values never evaluate to
true due to how TASK_SIZE is defined.

I always wanted to mimick powerpc's definition of TASK_SIZE, which
is simply TASK_SIZE_OF(current) and that also fixes the warning.

Signed-off-by: David S. Miller <davem@davemloft.net>

+2 -2
+2 -2
arch/sparc/include/asm/processor_64.h
··· 36 36 #define VPTE_SIZE (1 << (VA_BITS - PAGE_SHIFT + 3)) 37 37 #endif 38 38 39 - #define TASK_SIZE ((unsigned long)-VPTE_SIZE) 40 39 #define TASK_SIZE_OF(tsk) \ 41 40 (test_tsk_thread_flag(tsk,TIF_32BIT) ? \ 42 - (1UL << 32UL) : TASK_SIZE) 41 + (1UL << 32UL) : ((unsigned long)-VPTE_SIZE)) 42 + #define TASK_SIZE TASK_SIZE_OF(current) 43 43 #ifdef __KERNEL__ 44 44 45 45 #define STACK_TOP32 ((1UL << 32UL) - PAGE_SIZE)