Re: [PATCH 1/6] mm: change to return bool for ptep_test_and_clear_young()
From: IBM
Date: Sat Mar 21 2026 - 01:11:21 EST
Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxx>
> ---
> 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@xxxxxxxxx>