1 From dce5b0bdeec61bdbee56121ceb1d014151d5cab1 Mon Sep 17 00:00:00 2001
2 From: Arnd Bergmann <arnd@arndb.de>
3 Date: Thu, 18 Apr 2019 17:50:48 -0700
4 Subject: mm/kmemleak.c: fix unused-function warning
6 From: Arnd Bergmann <arnd@arndb.de>
8 commit dce5b0bdeec61bdbee56121ceb1d014151d5cab1 upstream.
10 The only references outside of the #ifdef have been removed, so now we
11 get a warning in non-SMP configurations:
13 mm/kmemleak.c:1404:13: error: unused function 'scan_large_block' [-Werror,-Wunused-function]
15 Add a new #ifdef around it.
17 Link: http://lkml.kernel.org/r/20190416123148.3502045-1-arnd@arndb.de
18 Fixes: 298a32b13208 ("kmemleak: powerpc: skip scanning holes in the .bss section")
19 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
20 Acked-by: Catalin Marinas <catalin.marinas@arm.com>
21 Cc: Vincent Whitchurch <vincent.whitchurch@axis.com>
22 Cc: Michael Ellerman <mpe@ellerman.id.au>
23 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
24 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
25 Cc: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
26 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
30 1 file changed, 2 insertions(+)
34 @@ -1401,6 +1401,7 @@ static void scan_block(void *_start, voi
36 * Scan a large memory block in MAX_SCAN_SIZE chunks to reduce the latency.
39 static void scan_large_block(void *start, void *end)
42 @@ -1412,6 +1413,7 @@ static void scan_large_block(void *start
49 * Scan a memory block corresponding to a kmemleak_object. A condition is