From: Alistair Popple <apopple@nvidia.com>
To: <akpm@linux-foundation.org>, <linux-mm@kvack.org>
Cc: <rcampbell@nvidia.com>, Alistair Popple <apopple@nvidia.com>,
Hulk Robot <hulkci@huawei.com>,
kernel test robot <oliver.sang@intel.com>,
"Yang Yingliang" <yangyingliang@huawei.com>
Subject: [PATCH] lib/test_hmm: Remove set but unused page variable
Date: Tue, 6 Jul 2021 12:56:03 +1000 [thread overview]
Message-ID: <20210706025603.4059-1-apopple@nvidia.com> (raw)
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]
Fixes: b659baea7546 ("mm: selftests for exclusive device memory")
Reported-by: Hulk Robot <hulkci@huawei.com>
Reported-by: kernel test robot <oliver.sang@intel.com>
Reported-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Alistair Popple <apopple@nvidia.com>
---
lib/test_hmm.c | 2 --
1 file changed, 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;
}
--
2.20.1
next reply other threads:[~2021-07-06 2:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-06 2:56 Alistair Popple [this message]
2021-07-06 16:00 ` Souptick Joarder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210706025603.4059-1-apopple@nvidia.com \
--to=apopple@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=hulkci@huawei.com \
--cc=linux-mm@kvack.org \
--cc=oliver.sang@intel.com \
--cc=rcampbell@nvidia.com \
--cc=yangyingliang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox