Home Home > GIT Browse
diff options
authorArnd Bergmann <arnd@arndb.de>2019-04-18 17:50:48 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-08 07:21:55 +0200
commite7c2d066566ba6ad9de9ea1dec21e08222d70d09 (patch)
parent5b94768bd07cdfbe3253ccd016add54681c3179c (diff)
mm/kmemleak.c: fix unused-function warning
commit dce5b0bdeec61bdbee56121ceb1d014151d5cab1 upstream. 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> Cc: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 5912a26e041c..72e3fb3bb037 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1373,6 +1373,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;
@@ -1384,6 +1385,7 @@ static void scan_large_block(void *start, void *end)
* Scan a memory block corresponding to a kmemleak_object. A condition is