summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAudra Mitchell <audra@redhat.com>2026-08-06 11:00:34 -0400
committerAndrew Morton <akpm@linux-foundation.org>2026-08-20 18:24:31 -0700
commit7cd1357f0a1092cdb24b48b945f91bca5b39651e (patch)
tree9641ee6639da727cb594e714d800074efe07fc25 /tools
parentc36ec991ce26593db519aeb547465249aed67e4a (diff)
downloadlinux-next-7cd1357f0a1092cdb24b48b945f91bca5b39651e.tar.gz
linux-next-7cd1357f0a1092cdb24b48b945f91bca5b39651e.zip
selftests/mm/vm_util.c: correct __pagemap_scan_get_categories return value
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. Link: https://lore.kernel.org/20260806150339.1824251-2-audra@redhat.com Signed-off-by: Audra Mitchell <audra@redhat.com> Reviewed-by: Liam R. Howlett (Oracle) <liam@infradead.org> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/mm/vm_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/mm/vm_util.c b/tools/testing/selftests/mm/vm_util.c
index 13b5cff7dfe3..4fe4a5a610d1 100644
--- a/tools/testing/selftests/mm/vm_util.c
+++ b/tools/testing/selftests/mm/vm_util.c
@@ -34,7 +34,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;
@@ -58,7 +58,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)