Re: [PATCH] selftests/mm: Fix soft-dirty kselftest supported check

David Hildenbrand (Arm)
2026-03-27T10:09:06Z

On 3/25/26 17:23, Audra Mitchell wrote:
> On Tue, Mar 24, 2026 at 04:24:45PM -0700, Andrew Morton wrote:
>> On Tue, 24 Mar 2026 16:23:24 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>>
>>>
>
> Wouldn't it be prudent to also update __pagemap_scan_get_categories
> return type to a long? Right now its uint64_t, but we expect a long
> to be returned from the ioctl:
>
> static long do_pagemap_cmd(struct file *file, unsigned int cmd,
> unsigned long arg)
>
> I've made the other changes, but I'll wait to push the next version after
> this feedback. Thanks!

Yes, definitely.

I was under the impression that __pagemap_scan_get_categories() could
actually return some kind of a mask that would warrant the uint64_t. But
we really just return the result from the ioctl().

And ioctl() is defined to return an int. So you could just return an int
there.

--
Cheers,

David