Skip to contentSkip to conversation

mm: cma: Fix stub for cma_skip_dt_default_reserved_mem()

PATCH In review Mark Brown 4 participants 6 messages Jan 28 – Feb 9

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 mm: cma: Fix stub for cma_skip_dt_default_reserved_mem()

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")
---
 include/linux/cma.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/cma.h +1 -1
index 0bf408360641..d0793eaaadaa 100644
@@ -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,

Signature · 1 line
Mark Brown <[email protected]>
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Mark Brown

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)

Quoted 6 lines
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

which are fatal with -Werror.

Fixes 26332ae848f08 ("of: reserved_mem: Allow reserved_mem framework detect "cma=" kernel param")
Quoted 26 lines
---
 include/linux/cma.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/cma.h +1 -2
index 0bf408360641..d0793eaaadaa 100644
@@ -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,

Signature · 1 line
Mark Brown <[email protected]>
Signature · 2 lines
Sincerely yours,
Mike.
#2 lore raw
In reply to Mark Brown
Quoted 8 lines · Mark Brown

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)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quoted 4 lines

which are fatal with -Werror.

Fixes 26332ae848f08 ("of: reserved_mem: Allow reserved_mem framework detect "cma=" kernel param")

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.

Quoted 22 lines
---
  include/linux/cma.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/cma.h +1 -2
index 0bf408360641..d0793eaaadaa 100644
@@ -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

Quoted 5 lines

Best regards,
--
Mark Brown <[email protected]>

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#3 lore raw
In reply to Mark Brown
Quoted 8 lines · Mark Brown

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)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quoted 4 lines

which are fatal with -Werror.

Fixes 26332ae848f08 ("of: reserved_mem: Allow reserved_mem framework detect "cma=" kernel param")
$ git show 26332ae848f08
fatal: ambiguous argument '26332ae848f08': unknown revision or path not in the working tree.

This is not upstream or against an mm tree. Against which tree is it?

Signature · 3 lines
Cheers,

David
#4 lore raw
Quoted 17 lines · David Hildenbrand (Arm)
Quoted 10 lines · Mark Brown

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) |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quoted 5 lines

which are fatal with -Werror.

Fixes 26332ae848f08 ("of: reserved_mem: Allow reserved_mem framework

detect "cma=" kernel param")

Quoted 5 lines
$ git show 26332ae848f08
fatal: ambiguous argument '26332ae848f08': unknown revision or path 
not in the working tree.

This is not upstream or against an mm tree. Against which tree is it?

The fix for this issue has been squashed into commit 0fd17e598333 ("of:
reserved_mem: Allow reserved_mem framework detect "cma=" kernel param") and merged to v6.19-rc8, so the above fix is not longer needed.

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#5 lore raw
Quoted 22 lines · Marek Szyprowski
Quoted 21 lines · David Hildenbrand (Arm)
Quoted 10 lines · Mark Brown

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) |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quoted 5 lines

which are fatal with -Werror.

Fixes 26332ae848f08 ("of: reserved_mem: Allow reserved_mem framework

detect "cma=" kernel param")

$ git show 26332ae848f08
fatal: ambiguous argument '26332ae848f08': unknown revision or path
not in the working tree.
Quoted 5 lines
Quoted 1 line

This is not upstream or against an mm tree. Against which tree is it?

The fix for this issue has been squashed into commit 0fd17e598333 ("of:
reserved_mem: Allow reserved_mem framework detect "cma=" kernel param") and merged to v6.19-rc8, so the above fix is not longer needed.

Ah, that's just what I wanted to ask: can this be squashed :)

Thanks!

Signature · 3 lines
Cheers,

David