summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-04-18 20:50:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-04-19 12:46:05 -0400
commitdce5b0bdeec61bdbee56121ceb1d014151d5cab1 (patch)
tree0b4553ed521557bf5332b8cfa82fdceb3b78806a /mm
parent6041186a32585fc7a1d0f6cfe2f138b05fdc3c82 (diff)
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 <arnd@arndb.de> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Vincent Whitchurch <vincent.whitchurch@axis.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/kmemleak.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 6c318f5ac234..2e435b8142e5 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1401,6 +1401,7 @@ static void scan_block(void *_start, void *_end,
1401/* 1401/*
1402 * Scan a large memory block in MAX_SCAN_SIZE chunks to reduce the latency. 1402 * Scan a large memory block in MAX_SCAN_SIZE chunks to reduce the latency.
1403 */ 1403 */
1404#ifdef CONFIG_SMP
1404static void scan_large_block(void *start, void *end) 1405static void scan_large_block(void *start, void *end)
1405{ 1406{
1406 void *next; 1407 void *next;
@@ -1412,6 +1413,7 @@ static void scan_large_block(void *start, void *end)
1412 cond_resched(); 1413 cond_resched();
1413 } 1414 }
1414} 1415}
1416#endif
1415 1417
1416/* 1418/*
1417 * Scan a memory block corresponding to a kmemleak_object. A condition is 1419 * Scan a memory block corresponding to a kmemleak_object. A condition is