summaryrefslogtreecommitdiffstats
path: root/lib/maple_tree.c
diff options
context:
space:
mode:
authorLiam R. Howlett <Liam.Howlett@oracle.com>2024-09-06 22:15:06 -0400
committerAndrew Morton <akpm@linux-foundation.org>2024-09-09 16:39:17 -0700
commit1930c6ad93ad01f82bb7965bbc04eb5a763f856d (patch)
treeaed8e321ee8d514cd02a1aca23a54feab3bbf3f8 /lib/maple_tree.c
parentaa50b501c0529677c27211c79c5b81de60af20a1 (diff)
downloadlinux-stable-1930c6ad93ad01f82bb7965bbc04eb5a763f856d.tar.gz
linux-stable-1930c6ad93ad01f82bb7965bbc04eb5a763f856d.tar.bz2
linux-stable-1930c6ad93ad01f82bb7965bbc04eb5a763f856d.zip
maple_tree: mark three functions as __maybe_unused
People keep trying to remove three functions that are going to be used in a feature that is being developed. Dropping the functions entirely may end up with people trying to use the bit for other uses, as people have tried in the past. Adding __maybe_unused stops compilers complaining about the unused functions so they can be silently optimised out of the compiled code and people won't try to claim the bit for another use. Link: https://lore.kernel.org/all/20230726080916.17454-2-zhangpeng.00@bytedance.com/ Link: https://lore.kernel.org/all/202408310728.S7EE59BN-lkp@intel.com/ Link: https://lkml.kernel.org/r/20240907021506.4018676-1-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Reviewed-by: Kuan-Wei Chiu <visitorckw@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/maple_tree.c')
-rw-r--r--lib/maple_tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 2058452e5ff3..2a57e489b206 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -348,17 +348,17 @@ static inline void *mte_safe_root(const struct maple_enode *node)
return (void *)((unsigned long)node & ~MAPLE_ROOT_NODE);
}
-static inline void *mte_set_full(const struct maple_enode *node)
+static inline void __maybe_unused *mte_set_full(const struct maple_enode *node)
{
return (void *)((unsigned long)node & ~MAPLE_ENODE_NULL);
}
-static inline void *mte_clear_full(const struct maple_enode *node)
+static inline void __maybe_unused *mte_clear_full(const struct maple_enode *node)
{
return (void *)((unsigned long)node | MAPLE_ENODE_NULL);
}
-static inline bool mte_has_null(const struct maple_enode *node)
+static inline bool __maybe_unused mte_has_null(const struct maple_enode *node)
{
return (unsigned long)node & MAPLE_ENODE_NULL;
}