mm/vmalloc.c: Fix "unused function" warning
Subsystems (2)
PATCH 1/1 mm/vmalloc.c: Fix "unused function" warning
compute_subtree_max_size() is unused, when building with DEBUG_AUGMENT_PROPAGATE_CHECK=y.
mm/vmalloc.c:785:1: warning: unused function 'compute_subtree_max_size' [-Wunused-function].
Reported-by Abaci Robot <[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
--- mm/vmalloc.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
mm/vmalloc.c +11 -11
@@ -778,17 +778,6 @@ get_subtree_max_size(struct rb_node *node)return va ? va->subtree_max_size :0 ; } -/* -* Gets called when remove the node and rotate. -*/ -static __always_inline unsigned long -compute_subtree_max_size (struct vmap_area *va) -{ -return max3 (va_size (va), -get_subtree_max_size (va->rb_node.rb_left), -get_subtree_max_size (va->rb_node.rb_right)); -} -RB_DECLARE_CALLBACKS_MAX (static, free_vmap_area_rb_augment_cb, struct vmap_area, rb_node, unsigned long, subtree_max_size, va_size)
@@ -978,6 +967,17 @@ unlink_va(struct vmap_area *va, struct rb_root *root) }#if DEBUG_AUGMENT_PROPAGATE_CHECK +/* +* Gets called when remove the node and rotate. +*/ +static __always_inline unsigned long +compute_subtree_max_size (struct vmap_area *va) +{ +return max3 (va_size (va), +get_subtree_max_size (va->rb_node.rb_left), +get_subtree_max_size (va->rb_node.rb_right)); +} +static void augment_tree_propagate_check (void ) {
Signature · 1 line
2.20.1.7.g153144c
Quoted 3 lines
compute_subtree_max_size()is unused, when building with DEBUG_AUGMENT_PROPAGATE_CHECK=y.
Nit: vice versa? It is only used when DEBUG_AUGMENT_PROPAGATE_CHECK=y
Quoted 52 lines
mm/vmalloc.c:785:1: warning: unused function 'compute_subtree_max_size' [-Wunused-function].Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- mm/vmalloc.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)mm/vmalloc.c +11
-11@@ -778,17 +778,6 @@ get_subtree_max_size(struct rb_node *node)return va ? va->subtree_max_size :0 ; } -/* -* Gets called when remove the node and rotate. -*/ -static __always_inline unsigned long -compute_subtree_max_size (struct vmap_area *va) -{ -return max3 (va_size (va), -get_subtree_max_size (va->rb_node.rb_left), -get_subtree_max_size (va->rb_node.rb_right)); -} -RB_DECLARE_CALLBACKS_MAX (static, free_vmap_area_rb_augment_cb, struct vmap_area, rb_node, unsigned long, subtree_max_size, va_size)@@ -978,6 +967,17 @@ unlink_va(struct vmap_area *va, struct rb_root *root) }#if DEBUG_AUGMENT_PROPAGATE_CHECK +/* +* Gets called when remove the node and rotate. +*/ +static __always_inline unsigned long +compute_subtree_max_size (struct vmap_area *va) +{ +return max3 (va_size (va), +get_subtree_max_size (va->rb_node.rb_left), +get_subtree_max_size (va->rb_node.rb_right)); +} +static void augment_tree_propagate_check (void ) {Signature · 1 line
2.20.1.7.g153144c
Reviewed-by Uladzislau Rezki (Sony) <[email protected]>
--
Vlad Rezki