Skip to contentSkip to conversation

maple_tree: remove unused maple_tree functions

PATCH In review Tom Rix 2 participants 2 messages Mar 19, 2023

Subsystems (3)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 maple_tree: remove unused maple_tree functions

clang with W=1 reports
lib/maple_tree.c:331:21: error: unused function
'mte_set_full' [-Werror,-Wunused-function]
static inline void *mte_set_full(const struct maple_enode *node)

                    ^
lib/maple_tree.c:336:21: error: unused function
  'mte_clear_full' [-Werror,-Wunused-function]
static inline void *mte_clear_full(const struct maple_enode *node)
                    ^
lib/maple_tree.c:341:20: error: unused function
  'mte_has_null' [-Werror,-Wunused-function]
static inline bool mte_has_null(const struct maple_enode *node)
                   ^

These static functions are not used, so remove them.

---
 lib/maple_tree.c | 15 ---------------
 1 file changed, 15 deletions(-)
lib/maple_tree.c +0 -15
index 556ca46a9b44..e407f29ef91a 100644
@@ -328,21 +328,6 @@ 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)
-{
-	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 inline bool ma_is_root(struct maple_node *node)
 {
 	return ((unsigned long)node->parent & MA_ROOT_PARENT);
Signature · 1 line
2.27.0
#1 lore raw
Quoted 13 lines · Tom Rix

clang with W=1 reports
lib/maple_tree.c:331:21: error: unused function
'mte_set_full' [-Werror,-Wunused-function]
static inline void *mte_set_full(const struct maple_enode *node)

                    ^
lib/maple_tree.c:336:21: error: unused function
  'mte_clear_full' [-Werror,-Wunused-function]
static inline void *mte_clear_full(const struct maple_enode *node)
                    ^
lib/maple_tree.c:341:20: error: unused function
  'mte_has_null' [-Werror,-Wunused-function]
static inline bool mte_has_null(const struct maple_enode *node)
                   ^
Quoted 1 line

These static functions are not used, so remove them.

No. They're just not used yet. NACK.