linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Maple Tree: Remove unused functions mte_set_full and mte_clear_full
@ 2022-09-14 10:18 Jiapeng Chong
  2022-09-14 10:20 ` Matthew Wilcox
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2022-09-14 10:18 UTC (permalink / raw)
  To: Liam.Howlett; +Cc: linux-mm, linux-kernel, Jiapeng Chong, Abaci Robot

mte_set_full and mte_clear_full are defined in the maple_tree.c file,
but not called elsewhere, so delete these unused function.

lib/maple_tree.c:330:20: warning: unused function 'mte_set_full'.
lib/maple_tree.c:335:20: warning: unused function 'mte_clear_full'.

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

diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index e1743803c851..e31b5b1f71d7 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -327,16 +327,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)
-{
-	node = (void *)((unsigned long)node & ~MAPLE_ENODE_NULL);
-}
-
-static inline void mte_clear_full(const struct maple_enode *node)
-{
-	node = (void *)((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	[flat|nested] 2+ messages in thread

* Re: [PATCH] Maple Tree: Remove unused functions mte_set_full and mte_clear_full
  2022-09-14 10:18 [PATCH] Maple Tree: Remove unused functions mte_set_full and mte_clear_full Jiapeng Chong
@ 2022-09-14 10:20 ` Matthew Wilcox
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2022-09-14 10:20 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: Liam.Howlett, linux-mm, linux-kernel, Abaci Robot

On Wed, Sep 14, 2022 at 06:18:29PM +0800, Jiapeng Chong wrote:
> mte_set_full and mte_clear_full are defined in the maple_tree.c file,
> but not called elsewhere, so delete these unused function.
> 
> lib/maple_tree.c:330:20: warning: unused function 'mte_set_full'.
> lib/maple_tree.c:335:20: warning: unused function 'mte_clear_full'.

They're not used now, but they will be in a release or two.  They're
static inline functions; keeping them as part of the orthogonal API
costs nothing when they're not used.


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

end of thread, other threads:[~2022-09-14 10:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14 10:18 [PATCH] Maple Tree: Remove unused functions mte_set_full and mte_clear_full Jiapeng Chong
2022-09-14 10:20 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox