From: Arnd Bergmann Date: Fri, 19 Apr 2019 00:50:48 +0000 (-0700) Subject: mm/kmemleak.c: fix unused-function warning X-Git-Tag: v5.4-rc1~1209^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dce5b0bdeec61bdbee56121ceb1d014151d5cab1;p=platform%2Fkernel%2Flinux-rpi.git mm/kmemleak.c: fix unused-function warning The only references outside of the #ifdef have been removed, so now we get a warning in non-SMP configurations: mm/kmemleak.c:1404:13: error: unused function 'scan_large_block' [-Werror,-Wunused-function] Add a new #ifdef around it. Link: http://lkml.kernel.org/r/20190416123148.3502045-1-arnd@arndb.de Fixes: 298a32b13208 ("kmemleak: powerpc: skip scanning holes in the .bss section") Signed-off-by: Arnd Bergmann Acked-by: Catalin Marinas Cc: Vincent Whitchurch Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 6c318f5..2e435b8 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1401,6 +1401,7 @@ static void scan_block(void *_start, void *_end, /* * Scan a large memory block in MAX_SCAN_SIZE chunks to reduce the latency. */ +#ifdef CONFIG_SMP static void scan_large_block(void *start, void *end) { void *next; @@ -1412,6 +1413,7 @@ static void scan_large_block(void *start, void *end) cond_resched(); } } +#endif /* * Scan a memory block corresponding to a kmemleak_object. A condition is