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/core-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.

core-pkey.c test has couple of 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-1-maddy@linux.ibm.com

+1 -18
+1 -18
tools/testing/selftests/powerpc/ptrace/core-pkey.c
··· 16 16 #include <unistd.h> 17 17 #include "ptrace.h" 18 18 #include "child.h" 19 - 20 - #ifndef __NR_pkey_alloc 21 - #define __NR_pkey_alloc 384 22 - #endif 23 - 24 - #ifndef __NR_pkey_free 25 - #define __NR_pkey_free 385 26 - #endif 19 + #include "pkeys.h" 27 20 28 21 #ifndef NT_PPC_PKEY 29 22 #define NT_PPC_PKEY 0x110 ··· 53 60 /* When the child crashed. */ 54 61 time_t core_time; 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 - 62 - static int sys_pkey_free(int pkey) 63 - { 64 - return syscall(__NR_pkey_free, pkey); 65 - } 66 63 67 64 static int increase_core_file_limit(void) 68 65 {