Re: lib/maple_tree.c:330:20: error: unused function 'mte_set_full'
From: Andrew Morton
Date: Fri Aug 30 2024 - 20:50:37 EST
On Sat, 31 Aug 2024 07:42:38 +0800 kernel test robot <lkp@xxxxxxxxx> wrote:
> All errors (new ones prefixed by >>):
>
> >> lib/maple_tree.c:330:20: error: unused function 'mte_set_full' [-Werror,-Wunused-function]
> 330 | static inline void mte_set_full(const struct maple_enode *node)
> | ^~~~~~~~~~~~
> >> lib/maple_tree.c:335:20: error: unused function 'mte_clear_full' [-Werror,-Wunused-function]
> 335 | static inline void mte_clear_full(const struct maple_enode *node)
> | ^~~~~~~~~~~~~~
> 2 errors generated.
afaict these have never been used. It's odd that this was just detected.
Should we just zap them or is there some reason to retain?
--- a/lib/maple_tree.c~a
+++ a/lib/maple_tree.c
@@ -348,21 +348,6 @@ static inline void *mte_safe_root(const
return (void *)((unsigned long)node & ~MAPLE_ROOT_NODE);
}
-static inline void *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)
-{
- return (void *)((unsigned long)node | MAPLE_ENODE_NULL);
-}
-
-static inline bool mte_has_null(const struct maple_enode *node)
-{
- return (unsigned long)node & MAPLE_ENODE_NULL;
-}
-
static __always_inline bool ma_is_root(struct maple_node *node)
{
return ((unsigned long)node->parent & MA_ROOT_PARENT);
_