[PATCH 1/6] mm: change to return bool for ptep_test_and_clear_young()
Baolin Wang
baolin.wang at linux.alibaba.com
Sat Mar 21 16:22:52 AEDT 2026
On 3/20/26 1:57 PM, Ritesh Harjani (IBM) wrote:
> 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>
Thanks for reviewing. Will remove externs:)
More information about the Linuxppc-dev
mailing list