[PATCH 1/6] mm: change to return bool for ptep_test_and_clear_young()
Ritesh Harjani (IBM)
ritesh.list at gmail.com
Fri Mar 20 16:57:48 AEDT 2026
Baolin Wang <baolin.wang at linux.alibaba.com> writes:
> Callers use ptep_test_and_clear_young() to clear the young flag and check
> whether it was set. Change the return type to bool to make the intention
> clearer.
>
Right I checked all callers of ptep_test_and_clear_young(). I agree, we
only need bool here.
> Signed-off-by: Baolin Wang <baolin.wang at linux.alibaba.com>
> ---
> arch/arm64/include/asm/pgtable.h | 8 ++++----
> arch/arm64/mm/contpte.c | 4 ++--
> arch/microblaze/include/asm/pgtable.h | 2 +-
> arch/parisc/include/asm/pgtable.h | 6 +++---
> arch/powerpc/include/asm/book3s/32/pgtable.h | 4 ++--
> arch/powerpc/include/asm/book3s/64/pgtable.h | 6 +++---
> arch/powerpc/include/asm/nohash/pgtable.h | 4 ++--
I looked at it because of powerpc changes, but ended up looking into all
call sites anyways. So overall it LGTM (and I agree that we can remove
the unnecessary externs from function declarations)
With that please feel free to add:
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list at gmail.com>
More information about the Linuxppc-dev
mailing list