Re: [PATCH 01/12] mm: Remove PFN_MAP, PFN_SG_CHAIN and PFN_SG_LAST

Jonathan Cameron
2025-05-29T11:46:24Z

On Thu, 29 May 2025 16:32:02 +1000
Alistair Popple <apopple@nvidia.com> wrote:

> The PFN_MAP flag is no longer used for anything, so remove it. The
> PFN_SG_CHAIN and PFN_SG_LAST flags never appear to have been used so
> also remove them.

Superficial thing but you seem to be be removing PFN_SPECIAL as well and
this description and patche description don't mention that.

>
> Signed-off-by: Alistair Popple <apopple@nvidia.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>

On superficial comment inline.

> ---
> include/linux/pfn_t.h | 31 +++----------------------------
> mm/memory.c | 2 --
> tools/testing/nvdimm/test/iomap.c | 4 ----
> 3 files changed, 3 insertions(+), 34 deletions(-)
>
> diff --git a/include/linux/pfn_t.h b/include/linux/pfn_t.h
> index 2d91482..46afa12 100644
> --- a/include/linux/pfn_t.h
> +++ b/include/linux/pfn_t.h
> @@ -5,26 +5,13 @@

> diff --git a/tools/testing/nvdimm/test/iomap.c b/tools/testing/nvdimm/test/iomap.c
> index e431372..ddceb04 100644
> --- a/tools/testing/nvdimm/test/iomap.c
> +++ b/tools/testing/nvdimm/test/iomap.c
> @@ -137,10 +137,6 @@ EXPORT_SYMBOL_GPL(__wrap_devm_memremap_pages);
>
> pfn_t __wrap_phys_to_pfn_t(phys_addr_t addr, unsigned long flags)
> {
> - struct nfit_test_resource *nfit_res = get_nfit_res(addr);
> -
> - if (nfit_res)
> - flags &= ~PFN_MAP;
> return phys_to_pfn_t(addr, flags);

Maybe not the time to point it out, but what is going on with indent here?
Looks like some spaces snuck in for that last line.

> }
> EXPORT_SYMBOL(__wrap_phys_to_pfn_t);