]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.117/mm-kmemleak.c-fix-unused-function-warning.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.14.117 / mm-kmemleak.c-fix-unused-function-warning.patch
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
5
6 From: Arnd Bergmann <arnd@arndb.de>
7
8 commit dce5b0bdeec61bdbee56121ceb1d014151d5cab1 upstream.
9
10 The only references outside of the #ifdef have been removed, so now we
11 get a warning in non-SMP configurations:
12
13 mm/kmemleak.c:1404:13: error: unused function 'scan_large_block' [-Werror,-Wunused-function]
14
15 Add a new #ifdef around it.
16
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>
27
28 ---
29 mm/kmemleak.c | 2 ++
30 1 file changed, 2 insertions(+)
31
32 --- a/mm/kmemleak.c
33 +++ b/mm/kmemleak.c
34 @@ -1364,6 +1364,7 @@ static void scan_block(void *_start, voi
35 /*
36 * Scan a large memory block in MAX_SCAN_SIZE chunks to reduce the latency.
37 */
38 +#ifdef CONFIG_SMP
39 static void scan_large_block(void *start, void *end)
40 {
41 void *next;
42 @@ -1375,6 +1376,7 @@ static void scan_large_block(void *start
43 cond_resched();
44 }
45 }
46 +#endif
47
48 /*
49 * Scan a memory block corresponding to a kmemleak_object. A condition is