* [PATCH] mm/hugetlb_cma: remove two unused include files
@ 2026-10-05 14:20 Enze Li
2026-10-06 13:46 ` Muchun Song
2026-10-08 11:22 ` SJ Park
0 siblings, 2 replies; 3+ messages in thread
From: Enze Li @ 2026-10-05 14:20 UTC (permalink / raw)
To: muchun.song, osalvador, david, akpm; +Cc: linux-mm, enze.li, Enze Li
hugetlb_cma.c includes <linux/mm_inline.h> and <asm/setup.h> but never
uses anything from them, so they can be dropped.
Found with clang-tidy (misc-include-cleaner). This holds regardless of
config: the file's only #ifdef is CONFIG_NUMA, and it only touches memblock
helpers, so removing these is safe on all arches.
Signed-off-by: Enze Li <lienze@kylinos.cn>
---
mm/hugetlb_cma.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/hugetlb_cma.c b/mm/hugetlb_cma.c
index 95fd2d190f0d..80b2407e9f07 100644
--- a/mm/hugetlb_cma.c
+++ b/mm/hugetlb_cma.c
@@ -4,10 +4,8 @@
#include <linux/cma.h>
#include <linux/compiler.h>
#include <linux/cpuset.h>
-#include <linux/mm_inline.h>
#include <asm/page.h>
-#include <asm/setup.h>
#include <linux/hugetlb.h>
#include <linux/memblock.h>
base-commit: 0aaec43576cd41474a8e90c919631c0c9fc88417
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/hugetlb_cma: remove two unused include files
2026-10-05 14:20 [PATCH] mm/hugetlb_cma: remove two unused include files Enze Li
@ 2026-10-06 13:46 ` Muchun Song
2026-10-08 11:22 ` SJ Park
1 sibling, 0 replies; 3+ messages in thread
From: Muchun Song @ 2026-10-06 13:46 UTC (permalink / raw)
To: Enze Li; +Cc: osalvador, david, akpm, linux-mm, enze.li
> On Oct 5, 2026, at 16:20, Enze Li <lienze@kylinos.cn> wrote:
>
> hugetlb_cma.c includes <linux/mm_inline.h> and <asm/setup.h> but never
> uses anything from them, so they can be dropped.
>
> Found with clang-tidy (misc-include-cleaner). This holds regardless of
> config: the file's only #ifdef is CONFIG_NUMA, and it only touches memblock
> helpers, so removing these is safe on all arches.
>
> Signed-off-by: Enze Li <lienze@kylinos.cn>
I'm inclined to believe clang-tidy tool.
Acked-by: Muchun Song <muchun.song@linux.dev>
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/hugetlb_cma: remove two unused include files
2026-10-05 14:20 [PATCH] mm/hugetlb_cma: remove two unused include files Enze Li
2026-10-06 13:46 ` Muchun Song
@ 2026-10-08 11:22 ` SJ Park
1 sibling, 0 replies; 3+ messages in thread
From: SJ Park @ 2026-10-08 11:22 UTC (permalink / raw)
To: Enze Li; +Cc: SJ Park, muchun.song, osalvador, david, akpm, linux-mm, enze.li
On Mon, 5 Oct 2026 22:20:40 +0800 Enze Li <lienze@kylinos.cn> wrote:
> hugetlb_cma.c includes <linux/mm_inline.h> and <asm/setup.h> but never
> uses anything from them, so they can be dropped.
Makes sense to me.
>
> Found with clang-tidy (misc-include-cleaner). This holds regardless of
> config: the file's only #ifdef is CONFIG_NUMA, and it only touches memblock
> helpers, so removing these is safe on all arches.
>
> Signed-off-by: Enze Li <lienze@kylinos.cn>
Reviewed-by: SJ Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-08 11:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-05 14:20 [PATCH] mm/hugetlb_cma: remove two unused include files Enze Li
2026-10-06 13:46 ` Muchun Song
2026-10-08 11:22 ` SJ Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox