提交 a1995a65 编写于 作者: D David S. Miller

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: NDavid S. Miller <davem@davemloft.net>
上级 e68f0aee
...@@ -36,10 +36,10 @@ ...@@ -36,10 +36,10 @@
#define VPTE_SIZE (1 << (VA_BITS - PAGE_SHIFT + 3)) #define VPTE_SIZE (1 << (VA_BITS - PAGE_SHIFT + 3))
#endif #endif
#define TASK_SIZE ((unsigned long)-VPTE_SIZE)
#define TASK_SIZE_OF(tsk) \ #define TASK_SIZE_OF(tsk) \
(test_tsk_thread_flag(tsk,TIF_32BIT) ? \ (test_tsk_thread_flag(tsk,TIF_32BIT) ? \
(1UL << 32UL) : TASK_SIZE) (1UL << 32UL) : ((unsigned long)-VPTE_SIZE))
#define TASK_SIZE TASK_SIZE_OF(current)
#ifdef __KERNEL__ #ifdef __KERNEL__
#define STACK_TOP32 ((1UL << 32UL) - PAGE_SIZE) #define STACK_TOP32 ((1UL << 32UL) - PAGE_SIZE)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册