The patch titled Subject: mm/vmalloc.c: fix "unused function" warning has been added to the -mm tree. Its filename is mm-vmallocc-fix-unused-function-warning.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-vmallocc-fix-unused-function-warning.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-vmallocc-fix-unused-function-warning.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx> Subject: 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]. Link: https://lkml.kernel.org/r/20220129034652.75359-1-jiapeng.chong@xxxxxxxxxxxxxxxxx Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx> Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmalloc.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) --- a/mm/vmalloc.c~mm-vmallocc-fix-unused-function-warning +++ a/mm/vmalloc.c @@ -776,17 +776,6 @@ get_subtree_max_size(struct rb_node *nod 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 r } #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) { _ Patches currently in -mm which might be from jiapeng.chong@xxxxxxxxxxxxxxxxx are mm-vmallocc-fix-unused-function-warning.patch