Skip to content

Commit d035230

Browse files
xzpeterakpm00
authored andcommitted
kselftest: vm: fix unused variable warning
Remove unused variable from the MDWE test. [joey.gouly@arm.com: add commit message] Link: https://lkml.kernel.org/r/20230308190423.46491-4-joey.gouly@arm.com Fixes: 4cf1fe3 ("kselftest: vm: add tests for memory-deny-write-execute") Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Joey Gouly <joey.gouly@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Alexey Izbyshev <izbyshev@ispras.ru> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: nd <nd@arm.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 3d27a95 commit d035230

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tools/testing/selftests/mm/mdwe_test.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,8 @@ TEST_F(mdwe, mprotect_WRITE_EXEC)
163163

164164
TEST_F(mdwe, mmap_FIXED)
165165
{
166-
void *p, *p2;
166+
void *p;
167167

168-
p2 = mmap(NULL, self->size, PROT_READ | PROT_EXEC, self->flags, 0, 0);
169168
self->p = mmap(NULL, self->size, PROT_READ, self->flags, 0, 0);
170169
ASSERT_NE(self->p, MAP_FAILED);
171170

0 commit comments

Comments
 (0)