Re: [PATCH v2] mm/page_ext: remove unused page_ext_iter_get()

From: Lorenzo Stoakes (ARM)

Date: Wed Nov 18 2026 - 07:15:20 EST


On Tue, Nov 17, 2026 at 04:26:18PM +0000, Shivank Garg wrote:
> It was added in commit 9039b9096ea2 ("mm: page_ext: add an iteration API
> for page extensions") but has never had a caller.
>
> Signed-off-by: Shivank Garg <shivankg@xxxxxxx>

(with MAINTAINERS change included) LGTM so:

Reviewed-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>

> ---
> I found this with the kunused scripts [1], which I wrote with LLM's
> help. The v1 cover letter [2] has more details on the scripts and
> how LLM was used.
>
> Changes in v2:
> - Split out of v1 [1], as David suggested, and based on
> page_alloc/for-next. No changes to the patch itself.
>
> [1] https://github.com/AMDESE/linux-mm/tree/shivank/kunused
> [2] https://lore.kernel.org/r/20261026-unused-sym-v1-0-82ca2dceabe1@xxxxxxx
> ---
> include/linux/page_ext.h | 11 -----------
> 1 file changed, 11 deletions(-)
>
> diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h
> index 79c53ec45dfa..52a8b70c525a 100644
> --- a/include/linux/page_ext.h
> +++ b/include/linux/page_ext.h
> @@ -167,17 +167,6 @@ static inline struct page_ext *page_ext_iter_next(struct page_ext_iter *iter,
> return iter->page_ext;
> }
>
> -/**
> - * page_ext_iter_get() - Get current page extension
> - * @iter: page extension iterator.
> - *
> - * Return: NULL if no page_ext exists for this iterator.
> - */
> -static inline struct page_ext *page_ext_iter_get(const struct page_ext_iter *iter)
> -{
> - return iter->page_ext;
> -}
> -
> /**
> * for_each_page_ext(): iterate through page_ext objects.
> * @__page: the page we're interested in
>
> ---
> base-commit: 3a99594e62fce8c646e8aac01d38af16d6833a40
> change-id: 20261109-unused-sym-page-ext-3fb8316ac777
>
> Best regards,
> --
> Shivank Garg <shivankg@xxxxxxx>
>

--
Cheers, Lorenzo