From: Audra Mitchell <audra@redhat.com>
To: david@kernel.org
Cc: jocolema@redhat.com, raquini@redhat.com,
Andrew Morton <akpm@linux-foundation.org>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
Muhammad Usama Anjum <usama.anjum@arm.com>,
Andrei Vagin <avagin@google.com>,
Colin Ian King <colin.i.king@gmail.com>,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] Correct __pagemap_scan_get_categories return value
Date: Thu, 6 Aug 2026 14:17:03 -0400 [thread overview]
Message-ID: <20260806181843.1839943-2-audra@redhat.com> (raw)
In-Reply-To: <20260806181843.1839943-1-audra@redhat.com>
Currently __pagemap_scan_get_categories returns the result from the
ioctl call which should be an int, not uint64_t. The ioctl may
return -1 on error, which will be interpreted as UINT64_MAX. Adjust
the return type to use the correct value.
Fixes: 600bca580579 ("selftests/mm: check that PAGEMAP_SCAN returns correct categories")
Signed-off-by: Audra Mitchell <audra@redhat.com>
---
tools/testing/selftests/mm/vm_util.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/mm/vm_util.c b/tools/testing/selftests/mm/vm_util.c
index 311fc5b4513e..6b65bd0a1e0b 100644
--- a/tools/testing/selftests/mm/vm_util.c
+++ b/tools/testing/selftests/mm/vm_util.c
@@ -31,7 +31,7 @@ uint64_t pagemap_get_entry(int fd, char *start)
return entry;
}
-static uint64_t __pagemap_scan_get_categories(int fd, char *start, struct page_region *r)
+static int __pagemap_scan_get_categories(int fd, char *start, struct page_region *r)
{
struct pm_scan_arg arg;
@@ -55,7 +55,7 @@ static uint64_t __pagemap_scan_get_categories(int fd, char *start, struct page_r
static uint64_t pagemap_scan_get_categories(int fd, char *start)
{
struct page_region r;
- long ret;
+ int ret;
ret = __pagemap_scan_get_categories(fd, start, &r);
if (ret < 0)
--
2.52.0
next prev parent reply other threads:[~2026-08-06 18:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 18:42 [PATCH] selftests/mm: Fix soft-dirty kselftest supported check Audra Mitchell
2026-02-24 16:15 ` David Hildenbrand (Arm)
2026-03-17 15:08 ` Audra Mitchell
2026-03-18 8:17 ` David Hildenbrand (Arm)
2026-03-19 18:59 ` Audra Mitchell
2026-03-20 11:26 ` David Hildenbrand (Arm)
2026-03-20 18:39 ` [PATCH V2] " Audra Mitchell
2026-03-20 18:39 ` [PATCH] " Audra Mitchell
2026-03-20 20:53 ` Andrew Morton
2026-03-23 11:56 ` David Hildenbrand (Arm)
2026-03-24 23:23 ` Andrew Morton
2026-03-24 23:24 ` Andrew Morton
2026-03-25 16:23 ` Audra Mitchell
2026-03-27 10:08 ` David Hildenbrand (Arm)
[not found] ` <20260806181843.1839943-1-audra@redhat.com>
2026-08-06 18:17 ` Audra Mitchell [this message]
2026-08-06 19:27 ` [PATCH 1/2] Correct __pagemap_scan_get_categories return value Andrew Morton
2026-08-06 18:17 ` [PATCH 2/2] selftests/mm: Fix soft-dirty kselftest supported check Audra Mitchell
2026-08-06 18:46 ` Andrew Morton
2026-03-27 10:52 ` [PATCH] " Lorenzo Stoakes (Oracle)
2026-03-27 10:58 ` Lorenzo Stoakes (Oracle)
2026-03-27 11:15 ` Lorenzo Stoakes (Oracle)
2026-03-27 11:14 ` Lorenzo Stoakes (Oracle)
2026-03-31 16:32 ` Audra Mitchell
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=20260806181843.1839943-2-audra@redhat.com \
--to=audra@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@google.com \
--cc=colin.i.king@gmail.com \
--cc=david@kernel.org \
--cc=jocolema@redhat.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=raquini@redhat.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=usama.anjum@arm.com \
--cc=vbabka@kernel.org \
/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