Skip to content

Commit b0e1b95

Browse files
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 parent 026ac4d commit b0e1b95

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,7 @@
77
*/
88
#include "ptrace.h"
99
#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"
1811

1912
#ifndef NT_PPC_PKEY
2013
#define NT_PPC_PKEY 0x110
@@ -61,11 +54,6 @@ struct shared_info {
6154
unsigned long invalid_uamor;
6255
};
6356

64-
static int sys_pkey_alloc(unsigned long flags, unsigned long init_access_rights)
65-
{
66-
return syscall(__NR_pkey_alloc, flags, init_access_rights);
67-
}
68-
6957
static int child(struct shared_info *info)
7058
{
7159
unsigned long reg;

0 commit comments

Comments
 (0)