diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-12-12 18:15:25 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2020-01-03 09:32:51 +0100 |
commit | 202bf8d7583f2b6e28de2e9edf6fcd7e3667a173 (patch) | |
tree | acc551431ec00ecd6c4935a7d4a2de51c0cae4c6 /arch/sparc | |
parent | compat: ARM64: always include asm-generic/compat.h (diff) | |
download | linux-202bf8d7583f2b6e28de2e9edf6fcd7e3667a173.tar.xz linux-202bf8d7583f2b6e28de2e9edf6fcd7e3667a173.zip |
compat: provide compat_ptr() on all architectures
In order to avoid needless #ifdef CONFIG_COMPAT checks,
move the compat_ptr() definition to linux/compat.h
where it can be seen by any file regardless of the
architecture.
Only s390 needs a special definition, this can use the
self-#define trick we have elsewhere.
Reviewed-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/compat.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/arch/sparc/include/asm/compat.h b/arch/sparc/include/asm/compat.h index 30b1763580b1..40a267b3bd52 100644 --- a/arch/sparc/include/asm/compat.h +++ b/arch/sparc/include/asm/compat.h @@ -125,23 +125,6 @@ typedef u32 compat_sigset_word; #define COMPAT_OFF_T_MAX 0x7fffffff -/* - * A pointer passed in from user mode. This should not - * be used for syscall parameters, just declare them - * as pointers because the syscall entry code will have - * appropriately converted them already. - */ - -static inline void __user *compat_ptr(compat_uptr_t uptr) -{ - return (void __user *)(unsigned long)uptr; -} - -static inline compat_uptr_t ptr_to_compat(void __user *uptr) -{ - return (u32)(unsigned long)uptr; -} - #ifdef CONFIG_COMPAT static inline void __user *arch_compat_alloc_user_space(long len) { |