aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShuah Khan <shuahkh@osg.samsung.com>2017-01-05 16:03:39 -0500
committerShuah Khan <shuahkh@osg.samsung.com>2017-01-11 11:51:15 -0500
commitfbb02ed8a14f54d0d07975025757e861e680e3be (patch)
tree45b96f49e22a7887871070af826bbc56814d1d14
parenta33f9d8e02edef6c2d9cfdf0b79a743d12468438 (diff)
selftests: x86 protection_keys fix unused variable compile warnings
Fix unused variable compile warnings in protection_keys.c Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
-rw-r--r--tools/testing/selftests/x86/protection_keys.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/tools/testing/selftests/x86/protection_keys.c b/tools/testing/selftests/x86/protection_keys.c
index bdd58c78902e..70402cd96265 100644
--- a/tools/testing/selftests/x86/protection_keys.c
+++ b/tools/testing/selftests/x86/protection_keys.c
@@ -812,8 +812,6 @@ void setup_hugetlbfs(void)
812{ 812{
813 int err; 813 int err;
814 int fd; 814 int fd;
815 int validated_nr_pages;
816 int i;
817 char buf[] = "123"; 815 char buf[] = "123";
818 816
819 if (geteuid() != 0) { 817 if (geteuid() != 0) {
@@ -1133,7 +1131,6 @@ void test_pkey_syscalls_on_non_allocated_pkey(int *ptr, u16 pkey)
1133void test_pkey_syscalls_bad_args(int *ptr, u16 pkey) 1131void test_pkey_syscalls_bad_args(int *ptr, u16 pkey)
1134{ 1132{
1135 int err; 1133 int err;
1136 int bad_flag = (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE) + 1;
1137 int bad_pkey = NR_PKEYS+99; 1134 int bad_pkey = NR_PKEYS+99;
1138 1135
1139 /* not enforced when pkey_get() is not a syscall 1136 /* not enforced when pkey_get() is not a syscall
@@ -1149,8 +1146,6 @@ void test_pkey_syscalls_bad_args(int *ptr, u16 pkey)
1149/* Assumes that all pkeys other than 'pkey' are unallocated */ 1146/* Assumes that all pkeys other than 'pkey' are unallocated */
1150void test_pkey_alloc_exhaust(int *ptr, u16 pkey) 1147void test_pkey_alloc_exhaust(int *ptr, u16 pkey)
1151{ 1148{
1152 unsigned long flags;
1153 unsigned long init_val;
1154 int err; 1149 int err;
1155 int allocated_pkeys[NR_PKEYS] = {0}; 1150 int allocated_pkeys[NR_PKEYS] = {0};
1156 int nr_allocated_pkeys = 0; 1151 int nr_allocated_pkeys = 0;