Re: [PATCH] mm: cma: Fix stub for cma_skip_dt_default_reserved_mem()

From: Marek Szyprowski

Date: Wed Jan 28 2026 - 18:31:52 EST


On 28.01.2026 17:28, Mark Brown wrote:
> The stub for cma_skip_dt_default_reserved_mem() is not inlined so
> triggers build warnings:
>
> In file included from /tmp/next/build/fs/proc/meminfo.c:18:
> /tmp/next/build/include/linux/cma.h:68:13: warning: 'cma_skip_dt_default_reserved_mem' defined but not used [-Wunused-function]
> 68 | static bool cma_skip_dt_default_reserved_mem(void)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> which are fatal with -Werror.
>
> Fixes: 26332ae848f08 ("of: reserved_mem: Allow reserved_mem framework detect "cma=" kernel param")
> Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>

I'm really sorry for this build break and thanks for applying this fix
for today's release.

This issue has been introduced by my amendment to the original patch, so
if You don't mind, I will amend it again and squash with this fix to
avoid messing the last minute fix with potentially not bisectable branch.

> ---
> include/linux/cma.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/cma.h b/include/linux/cma.h
> index 0bf408360641..d0793eaaadaa 100644
> --- a/include/linux/cma.h
> +++ b/include/linux/cma.h
> @@ -65,7 +65,7 @@ extern void cma_reserve_pages_on_error(struct cma *cma);
> #ifdef CONFIG_DMA_CMA
> extern bool cma_skip_dt_default_reserved_mem(void);
> #else
> -static bool cma_skip_dt_default_reserved_mem(void)
> +static inline bool cma_skip_dt_default_reserved_mem(void)
> {
> return false;
> }
>
> ---
> base-commit: d0d97f0b2b2b4633022dfaef4ac08af0b7917efe
> change-id: 20260128-cma-fix-stubs-26b13ce1471d
>
> Best regards,
> --
> Mark Brown <broonie@xxxxxxxxxx>
>
>
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland