aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Popple <[email protected]>2021-07-14 21:26:58 -0700
committerLinus Torvalds <[email protected]>2021-07-15 10:13:49 -0700
commitc52114d9df6a193fba5317933c75bc9bb5f6cf8a (patch)
treed33d5d70f1db0cb7880912ab67c5303aca928fb9
parentab7965de1725cd8514f0edbced5c2fb793846078 (diff)
lib/test_hmm: remove set but unused page variable
The HMM selftests use atomic_check_access() to check atomic access to a page has been revoked. It doesn't matter if the page mapping has been removed from the mirrored page tables as that also implies atomic access has been revoked. Therefore remove the unused page variable to fix this compiler warning: lib/test_hmm.c:631:16: warning: variable `page' set but not used [-Wunused-but-set-variable] Link: https://lkml.kernel.org/r/[email protected] Fixes: b659baea7546 ("mm: selftests for exclusive device memory") Signed-off-by: Alistair Popple <[email protected]> Reported-by: Hulk Robot <[email protected]> Reported-by: kernel test robot <[email protected]> Reported-by: Yang Yingliang <[email protected]> Acked-by: Souptick Joarder <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--lib/test_hmm.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/test_hmm.c b/lib/test_hmm.c
index 8c55c4723692..c259842f6d44 100644
--- a/lib/test_hmm.c
+++ b/lib/test_hmm.c
@@ -628,10 +628,8 @@ static int dmirror_check_atomic(struct dmirror *dmirror, unsigned long start,
for (pfn = start >> PAGE_SHIFT; pfn < (end >> PAGE_SHIFT); pfn++) {
void *entry;
- struct page *page;
entry = xa_load(&dmirror->pt, pfn);
- page = xa_untag_pointer(entry);
if (xa_pointer_tag(entry) == DPT_XA_TAG_ATOMIC)
return -EPERM;
}