Skip to contentSkip to conversation

maple_tree: remove undocumented CONFIG_MAPLE_RCU_DISABLED macro

PATCH Applied Ethan Nelson-Moore 4 participants 4 messages Jun 10 – Jun 11

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 maple_tree: remove undocumented CONFIG_MAPLE_RCU_DISABLED macro

<linux/maple_tree.h> consults the macro CONFIG_MAPLE_RCU_DISABLED to determine whether to disable the mt_in_rcu() function (by making it always return false). This macro is not reachable via Kconfig, despite its name, and is not documented anywhere. Remove it to avoid polluting the CONFIG_* namespace.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

---
 include/linux/maple_tree.h | 4 ----
 1 file changed, 4 deletions(-)
include/linux/maple_tree.h +0 -4
index 4a5631906aff..1b3014377105 100644
@@ -11,7 +11,6 @@
 #include <linux/kernel.h>
 #include <linux/rcupdate.h>
 #include <linux/spinlock.h>
-/* #define CONFIG_MAPLE_RCU_DISABLED */
 
 /*
  * Allocated nodes are mutable until they have been inserted into the tree,
@@ -864,9 +863,6 @@ static inline void mt_init(struct maple_tree *mt)
 
 static inline bool mt_in_rcu(struct maple_tree *mt)
 {
-#ifdef CONFIG_MAPLE_RCU_DISABLED
-	return false;
-#endif
 	return mt->ma_flags & MT_FLAGS_USE_RCU;
 }
 
Signature · 1 line
2.43.0
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · On Wed, 10 Jun 2026 15:09:04 -0700 Ethan Nelson-Moore <[email protected]>…

<linux/maple_tree.h> consults the macro CONFIG_MAPLE_RCU_DISABLED to determine whether to disable the mt_in_rcu() function (by making it always return false). This macro is not reachable via Kconfig, despite its name, and is not documented anywhere. Remove it to avoid polluting the CONFIG_* namespace.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

Seems this was also found in the past [1], and apparently this is not intended to be as is.

I also think it is better to be removed or renamed.

[1] https://lore.kernel.org/20230906152325.dblzauybyoq5kd35@revolver

Quoted 2 lines

Thanks,
SJ

[...]

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Ethan Nelson-Moore
Quoted 10 lines · Ethan Nelson-Moore

<linux/maple_tree.h> consults the macro CONFIG_MAPLE_RCU_DISABLED to determine whether to disable the mt_in_rcu() function (by making it always return false). This macro is not reachable via Kconfig, despite its name, and is not documented anywhere. Remove it to avoid polluting the CONFIG_* namespace.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.

Quoted 29 lines
---
 include/linux/maple_tree.h | 4 ----
 1 file changed, 4 deletions(-)
include/linux/maple_tree.h +0 -4
index 4a5631906aff..1b3014377105 100644
@@ -11,7 +11,6 @@
 #include <linux/kernel.h>
 #include <linux/rcupdate.h>
 #include <linux/spinlock.h>
-/* #define CONFIG_MAPLE_RCU_DISABLED */
 
 /*
  * Allocated nodes are mutable until they have been inserted into the tree,
@@ -864,9 +863,6 @@ static inline void mt_init(struct maple_tree *mt)
 
 static inline bool mt_in_rcu(struct maple_tree *mt)
 {
-#ifdef CONFIG_MAPLE_RCU_DISABLED
-	return false;
-#endif
 	return mt->ma_flags & MT_FLAGS_USE_RCU;
 }
 
Signature · 1 line
2.43.0
reviewer Reviewed-by on v1 1/1
#3 lore raw
In reply to Ethan Nelson-Moore
Quoted 10 lines · Ethan Nelson-Moore

<linux/maple_tree.h> consults the macro CONFIG_MAPLE_RCU_DISABLED to determine whether to disable the mt_in_rcu() function (by making it always return false). This macro is not reachable via Kconfig, despite its name, and is not documented anywhere. Remove it to avoid polluting the CONFIG_* namespace.

Discovered while searching for CONFIG_* symbols referenced in code but not defined in any Kconfig file.