Skip to content

Commit

Permalink
sparc64: Kill annoying warning when building compat_binfmt_elf.o
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Nov 2, 2008
1 parent e68f0ae commit a1995a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/sparc/include/asm/processor_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
#define VPTE_SIZE (1 << (VA_BITS - PAGE_SHIFT + 3))
#endif

#define TASK_SIZE ((unsigned long)-VPTE_SIZE)
#define TASK_SIZE_OF(tsk) \
(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__

#define STACK_TOP32 ((1UL << 32UL) - PAGE_SIZE)
Expand Down

0 comments on commit a1995a6

Please sign in to comment.