Re: [PATCH 8/8] mm: remove thp_size() and thp_order()
From: Lorenzo Stoakes (ARM)
Date: Tue Nov 03 2026 - 04:12:33 EST
On Mon, Nov 02, 2026 at 05:54:13PM -0500, Tal Zussman wrote:
> The last callers of thp_size() have been converted to folio_size(), and
> thp_order()'s only remaining user was thp_size() itself, so remove
> both.
>
> Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
> Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
LGTM so:
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>
> ---
> include/linux/mm.h | 21 ---------------------
> 1 file changed, 21 deletions(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 8b5883878538..143865580169 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -2146,27 +2146,6 @@ static inline unsigned int page_shift(struct page *page)
> return PAGE_SHIFT + compound_order(page);
> }
>
> -/**
> - * thp_order - Order of a transparent huge page.
> - * @page: Head page of a transparent huge page.
> - */
> -static inline unsigned int thp_order(struct page *page)
> -{
> - VM_BUG_ON_PGFLAGS(PageTail(page), page);
> - return compound_order(page);
> -}
> -
> -/**
> - * thp_size - Size of a transparent huge page.
> - * @page: Head page of a transparent huge page.
> - *
> - * Return: Number of bytes in this page.
> - */
> -static inline unsigned long thp_size(struct page *page)
> -{
> - return PAGE_SIZE << thp_order(page);
> -}
> -
> #ifdef CONFIG_MMU
> /*
> * Do pte_mkwrite, but only if the vma says VM_WRITE. We do this when
>
> --
> 2.39.5
>
--
Cheers, Lorenzo