sparc: simplify syscall_get_arch()
authorEric Paris <eparis@redhat.com>
Tue, 22 Apr 2014 16:07:30 +0000 (12:07 -0400)
committerEric Paris <eparis@redhat.com>
Tue, 23 Sep 2014 20:21:27 +0000 (16:21 -0400)
Include linux/thread_info.h so we can use is_32_bit_task() cleanly.
Then just simplify syscall_get_arch() since is_32_bit_task() works for
all configuration options.

Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Eric Paris <eparis@redhat.com>
arch/powerpc/include/asm/syscall.h

index 4271544..6fa2708 100644 (file)
@@ -14,8 +14,8 @@
 #define _ASM_SYSCALL_H 1
 
 #include <uapi/linux/audit.h>
-#include <linux/compat.h>
 #include <linux/sched.h>
+#include <linux/thread_info.h>
 
 /* ftrace syscalls requires exporting the sys_call_table */
 #ifdef CONFIG_FTRACE_SYSCALLS
@@ -90,12 +90,6 @@ static inline void syscall_set_arguments(struct task_struct *task,
 
 static inline int syscall_get_arch(void)
 {
-       int arch = AUDIT_ARCH_PPC;
-
-#ifdef CONFIG_PPC64
-       if (!is_32bit_task())
-               arch = AUDIT_ARCH_PPC64;
-#endif
-       return arch;
+       return is_32bit_task() ? AUDIT_ARCH_PPC : AUDIT_ARCH_PPC64;
 }
 #endif /* _ASM_SYSCALL_H */