[PATCH v6 14/25] powerpc: Provide do_ppc64_personality helper
Rohan McLure
rmclure at linux.ibm.com
Wed Sep 21 16:55:54 AEST 2022
Avoid duplication in future patch that will define the ppc64_personality
syscall handler in terms of the SYSCALL_DEFINE and COMPAT_SYSCALL_DEFINE
macros, by extracting the common body of ppc64_personality into a helper
function.
Signed-off-by: Rohan McLure <rmclure at linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin at gmail.com>
---
V3: New commit.
V5: Remove 'inline'.
---
arch/powerpc/kernel/syscalls.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c
index 9830957498b0..135a0b9108d5 100644
--- a/arch/powerpc/kernel/syscalls.c
+++ b/arch/powerpc/kernel/syscalls.c
@@ -75,7 +75,7 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, size_t, len,
}
#ifdef CONFIG_PPC64
-long ppc64_personality(unsigned long personality)
+static long do_ppc64_personality(unsigned long personality)
{
long ret;
@@ -87,6 +87,10 @@ long ppc64_personality(unsigned long personality)
ret = (ret & ~PER_MASK) | PER_LINUX;
return ret;
}
+long ppc64_personality(unsigned long personality)
+{
+ return do_ppc64_personality(personality);
+}
#endif
long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low,
--
2.34.1
More information about the Linuxppc-dev
mailing list