Skip to content

Commit 026ac4d

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

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

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

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,7 @@
1616
#include <unistd.h>
1717
#include "ptrace.h"
1818
#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"
2720

2821
#ifndef NT_PPC_PKEY
2922
#define NT_PPC_PKEY 0x110
@@ -61,16 +54,6 @@ struct shared_info {
6154
time_t core_time;
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-
69-
static int sys_pkey_free(int pkey)
70-
{
71-
return syscall(__NR_pkey_free, pkey);
72-
}
73-
7457
static int increase_core_file_limit(void)
7558
{
7659
struct rlimit rlim;

0 commit comments

Comments
 (0)