[PATCH 02/11] mm/cma: include linux/cma.h in cma.h

From: Eric Chanudet

Date: Fri Aug 21 2026 - 14:58:05 EST


cma.h needs definitions from linux/cma.h (e.g, MAX_CMA_AREAS,
CMA_MAX_NAME), so including mm/cma.h requires including linux/cma.h.
Make the dependency explicit by including the header directly.

Signed-off-by: Eric Chanudet <echanude@xxxxxxxxxx>
---
mm/cma.c | 1 -
mm/cma.h | 1 +
mm/cma_debug.c | 1 -
mm/cma_sysfs.c | 1 -
4 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/cma.c b/mm/cma.c
index e1820fb451e4..03f98f6d45a5 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -25,7 +25,6 @@
#include <linux/string.h>
#include <linux/string_choices.h>
#include <linux/log2.h>
-#include <linux/cma.h>
#include <linux/highmem.h>
#include <linux/io.h>
#include <linux/kmemleak.h>
diff --git a/mm/cma.h b/mm/cma.h
index c70180c36559..0c9de38d6bff 100644
--- a/mm/cma.h
+++ b/mm/cma.h
@@ -4,6 +4,7 @@

#include <linux/debugfs.h>
#include <linux/kobject.h>
+#include <linux/cma.h>

struct cma_kobject {
struct kobject kobj;
diff --git a/mm/cma_debug.c b/mm/cma_debug.c
index 523ba4a0f9f7..70bfc6fbeeca 100644
--- a/mm/cma_debug.c
+++ b/mm/cma_debug.c
@@ -7,7 +7,6 @@


#include <linux/debugfs.h>
-#include <linux/cma.h>
#include <linux/list.h>
#include <linux/kernel.h>
#include <linux/slab.h>
diff --git a/mm/cma_sysfs.c b/mm/cma_sysfs.c
index d5bf792c6245..e4ee35bc682b 100644
--- a/mm/cma_sysfs.c
+++ b/mm/cma_sysfs.c
@@ -5,7 +5,6 @@
* Copyright (c) 2021 Minchan Kim <minchan@xxxxxxxxxx>
*/

-#include <linux/cma.h>
#include <linux/kernel.h>
#include <linux/slab.h>


--
2.53.0