Re: [PATCH 1/6] mm: change to return bool for ptep_test_and_clear_young()
Baolin Wang <[email protected]>
| Newsgroups | org.kernel.vger.linux-parisc,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-riscv,org.kernel.vger.kvm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-s390,org.kvack.linux-mm,org.ozlabs.lists.linuxppc-dev |
|---|---|
| Message-ID | <[email protected]> |
On 3/20/26 1:57 PM, Ritesh Harjani (IBM) wrote: > Baolin Wang <[email protected]> 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 <[email protected]> >> --- >> 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) <[email protected]> Thanks for reviewing. Will remove externs:)