* [PATCH] maple_tree: remove unused maple_tree functions
@ 2023-03-19 13:29 Tom Rix
2023-03-19 19:42 ` Matthew Wilcox
0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-03-19 13:29 UTC (permalink / raw)
To: Liam.Howlett, nathan, ndesaulniers; +Cc: linux-mm, linux-kernel, llvm, 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)
^
These static functions are not used, so remove them.
Signed-off-by: Tom Rix <trix@redhat.com>
---
lib/maple_tree.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 556ca46a9b44..e407f29ef91a 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -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);
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] maple_tree: remove unused maple_tree functions
2023-03-19 13:29 [PATCH] maple_tree: remove unused maple_tree functions Tom Rix
@ 2023-03-19 19:42 ` Matthew Wilcox
0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2023-03-19 19:42 UTC (permalink / raw)
To: Tom Rix; +Cc: Liam.Howlett, nathan, ndesaulniers, linux-mm, linux-kernel, llvm
On Sun, Mar 19, 2023 at 09:29:03AM -0400, Tom Rix wrote:
> 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.
No. They're just not used yet. NACK.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-19 19:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-19 13:29 [PATCH] maple_tree: remove unused maple_tree functions Tom Rix
2023-03-19 19:42 ` Matthew Wilcox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).