The patch titled Subject: lib/test_hmm: remove set but unused page variable has been added to the -mm tree. Its filename is lib-test_hmm-remove-set-but-unused-page-variable.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/lib-test_hmm-remove-set-but-unused-page-variable.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/lib-test_hmm-remove-set-but-unused-page-variable.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Alistair Popple <apopple@xxxxxxxxxx> Subject: 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/20210706025603.4059-1-apopple@xxxxxxxxxx Fixes: b659baea7546 ("mm: selftests for exclusive device memory") Signed-off-by: Alistair Popple <apopple@xxxxxxxxxx> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx> Reported-by: kernel test robot <oliver.sang@xxxxxxxxx> Reported-by: Yang Yingliang <yangyingliang@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/test_hmm.c | 2 -- 1 file changed, 2 deletions(-) --- a/lib/test_hmm.c~lib-test_hmm-remove-set-but-unused-page-variable +++ a/lib/test_hmm.c @@ -628,10 +628,8 @@ static int dmirror_check_atomic(struct d 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; } _ Patches currently in -mm which might be from apopple@xxxxxxxxxx are lib-test_hmm-remove-set-but-unused-page-variable.patch