linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] maple_tree: Remove some unused functions
@ 2023-02-17  8:46 Jiapeng Chong
  2023-02-17 14:10 ` Matthew Wilcox
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2023-02-17  8:46 UTC (permalink / raw)
  To: Liam.Howlett; +Cc: linux-mm, linux-kernel, Jiapeng Chong, Abaci Robot

These functions are defined in the maple_tree.c file, but not called
elsewhere, so delete these unused functions.

lib/maple_tree.c:331:21: warning: unused function 'mte_set_full'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4105
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 lib/maple_tree.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 646297cae5d1..f89b61e37d93 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.20.1.7.g153144c



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] maple_tree: Remove some unused functions
  2023-02-17  8:46 [PATCH] maple_tree: Remove some unused functions Jiapeng Chong
@ 2023-02-17 14:10 ` Matthew Wilcox
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2023-02-17 14:10 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: Liam.Howlett, linux-mm, linux-kernel, Abaci Robot

On Fri, Feb 17, 2023 at 04:46:47PM +0800, Jiapeng Chong wrote:
> These functions are defined in the maple_tree.c file, but not called
> elsewhere, so delete these unused functions.

These are for a feature that hasn't been implemented yet.
They're static inline, so they cost nothing to keep around.
NAK.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-17 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17  8:46 [PATCH] maple_tree: Remove some unused functions Jiapeng Chong
2023-02-17 14:10 ` 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).