Re: [PATCH 2/2] nvdimm/pmem: Remove test_and_clear_pmem_poison()

From: Muchun Song

Date: Thu Sep 03 2026 - 02:18:04 EST




> On Sep 3, 2026, at 13:35, Kaitao Cheng <kaitao.cheng@xxxxxxxxx> wrote:
>
> From: Kaitao Cheng <chengkaitao@xxxxxxxxxx>
>
> TestClearPageHWPoison() is now defined regardless of whether
> CONFIG_MEMORY_FAILURE is enabled, returning false when memory failure
> handling is unavailable.
>
> The test_and_clear_pmem_poison() wrapper duplicates this configuration
> handling and has no other pmem-specific behavior.
>
> Call TestClearPageHWPoison() directly and remove the redundant wrapper.
> This also removes the need to include page-flags.h from pmem.h.
>
> No functional change is intended.
>
> Signed-off-by: Kaitao Cheng <chengkaitao@xxxxxxxxxx>

The code becomes simpler.

Acked-by: Muchun Song <muchun.song@xxxxxxxxx>

Thanks.