Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftest/powerpc/ptrace/ptrace-pkey: Remove duplicate macros

./powerpc/ptrace/Makefile includes flags.mk.
In flags.mk, -I$(selfdir)/powerpc/include is
always included as part of CFLAGS. So it will
pick up the "pkeys.h" defined in powerpc/include.

ptrace-pkey.c test has macros defined which
are part of "pkeys.h" header file. Remove those
duplicates and include "pkeys.h"

Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20241216160257.87252-2-maddy@linux.ibm.com

+1 -13
+1 -13
tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c
··· 7 7 */ 8 8 #include "ptrace.h" 9 9 #include "child.h" 10 - 11 - #ifndef __NR_pkey_alloc 12 - #define __NR_pkey_alloc 384 13 - #endif 14 - 15 - #ifndef __NR_pkey_free 16 - #define __NR_pkey_free 385 17 - #endif 10 + #include "pkeys.h" 18 11 19 12 #ifndef NT_PPC_PKEY 20 13 #define NT_PPC_PKEY 0x110 ··· 53 60 unsigned long invalid_iamr; 54 61 unsigned long invalid_uamor; 55 62 }; 56 - 57 - static int sys_pkey_alloc(unsigned long flags, unsigned long init_access_rights) 58 - { 59 - return syscall(__NR_pkey_alloc, flags, init_access_rights); 60 - } 61 63 62 64 static int child(struct shared_info *info) 63 65 {