diff options
| author | Eamon Sippy <eamon112009@gmail.com> | 2026-08-15 10:32:45 +0000 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-06 17:39:08 -0700 |
| commit | 4886cec0b283ff89c87c7b92f22e328439bf7b1f (patch) | |
| tree | 2691eb89b608981fd1e72d5187e0e1d7d43a4fe1 /include/linux | |
| parent | 8e7caac55a6f71559925860595198489cb3641c0 (diff) | |
mm: cma: make mm/cma.h self-contained and conditionalize includes
mm/cma.h uses types from <linux/spinlock.h>, <linux/mutex.h>,
<linux/atomic.h> and <linux/list.h> without explicitly including them,
violating the kernel header self-containment guidelines.
<linux/debugfs.h> and <linux/kobject.h> are also included unconditionally
even though they are only needed under CONFIG_CMA_DEBUGFS and
CONFIG_CMA_SYSFS respectively. Move the struct cma_kobject definition and
<linux/kobject.h> inside the CONFIG_CMA_SYSFS block, and move
<linux/debugfs.h> inside CONFIG_CMA_DEBUGFS.
Remove spurious trailing semicolons after the empty inline function bodies
in the CONFIG_CMA_SYSFS #else branch.
Add <linux/cma.h> so that MAX_CMA_AREAS and CMA_MAX_NAME are always
available when this header is included.
Link: https://lore.kernel.org/20260815103246.5315-1-eamon112009@gmail.com
Signed-off-by: Eamon Sippy <eamon112009@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Barry Song <baohua@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
