Re: [PATCH] mm: add some missing includes to mm-local headers
From: Zi Yan
Date: Tue Aug 04 2026 - 16:03:11 EST
On 4 Aug 2026, at 6:08, Lorenzo Stoakes (ARM) wrote:
> There are a number of internal headers local to mm/ which reference
> functions and data types without including the relevant headers.
>
> mm/vma.h is a special case that intentionally does not include additional
> headers, but the others are not.
>
> This breaks tooling like clangd (which is where I noticed this), though the
> build is OK due to the C files including the headers happening to include
> required dependencies.
>
> It's better to be explicit about dependencies anyway, so add the missing
> includes and fix clangd as a bonus.
>
> Signed-off-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>
> ---
> mm/cma.h | 1 +
> mm/hugetlb_cma.h | 2 ++
> mm/memcontrol-v1.h | 1 +
> mm/pgalloc-track.h | 3 +++
> mm/shuffle.h | 2 ++
> mm/swap.h | 1 +
> mm/vmalloc.h | 2 ++
> 7 files changed, 12 insertions(+)
>
Acked-by: Zi Yan <ziy@xxxxxxxxxx>
Best Regards,
Yan, Zi