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

Andrew Morton
2026-03-24T23:23:28Z

On Mon, 23 Mar 2026 12:56:33 +0100 "David Hildenbrand (Arm)" <david@kernel.org> wrote:

> > + supported = __pagemap_scan_get_categories(fd, test_area, &r) >= 0;
>
> You have to cast it to a (long) first before comparing, like we do in
> pagemap_scan_get_categories().
>
>
> Maybe best written as
>
> long ret = __pagemap_scan_get_categories(fd, test_area, &r);
>
> if (ret >= 0)
> supported = 1;
>
> > + ksft_print_msg("errno: %d\n", errno);
>
> I guess we should drop that, was mostly for testing.