[PATCH v4 04/20] powerpc: Provide do_ppc64_personality helper
Nicholas Piggin
npiggin at gmail.com
Mon Sep 12 19:26:46 AEST 2022
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote:
> 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>
> ---
> V2 -> V3: New commit.
> ---
> 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 ef5896bee818..9f29e451e2de 100644
> --- a/arch/powerpc/kernel/syscalls.c
> +++ b/arch/powerpc/kernel/syscalls.c
> @@ -64,7 +64,7 @@ SYSCALL_DEFINE6(mmap, unsigned long, addr, size_t, len,
> }
>
> #ifdef CONFIG_PPC64
> -long ppc64_personality(unsigned long personality)
> +static inline long do_ppc64_personality(unsigned long personality)
> {
> long ret;
>
If this was merged in patch 7 it would just include the above, right?
I don't really mind if you prefer to split it this way though and make
fewer changes in patch 7.
Could you drop the 'inline'? I don't think it's necessary for modern
compliers. do_mmap2 could drop it too.
I did have a question about the duplication in patch 7, but assuming
you still need this patch
Reviewed-by: Nicholas Piggin <npiggin at gmail.com>
>
> 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