提交 dce5b0bd 编写于 作者: A Arnd Bergmann 提交者: Linus Torvalds

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: 298a32b1 ("kmemleak: powerpc: skip scanning holes in the .bss section")
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
Cc: Vincent Whitchurch <vincent.whitchurch@axis.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 6041186a
...@@ -1401,6 +1401,7 @@ static void scan_block(void *_start, void *_end, ...@@ -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. * 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) static void scan_large_block(void *start, void *end)
{ {
void *next; void *next;
...@@ -1412,6 +1413,7 @@ static void scan_large_block(void *start, void *end) ...@@ -1412,6 +1413,7 @@ static void scan_large_block(void *start, void *end)
cond_resched(); cond_resched();
} }
} }
#endif
/* /*
* Scan a memory block corresponding to a kmemleak_object. A condition is * Scan a memory block corresponding to a kmemleak_object. A condition is
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册