]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.19.41/mm-kmemleak.c-fix-unused-function-warning.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.19.41 / mm-kmemleak.c-fix-unused-function-warning.patch
CommitLineData
09293061
GKH
1From dce5b0bdeec61bdbee56121ceb1d014151d5cab1 Mon Sep 17 00:00:00 2001
2From: Arnd Bergmann <arnd@arndb.de>
3Date: Thu, 18 Apr 2019 17:50:48 -0700
4Subject: mm/kmemleak.c: fix unused-function warning
5
6From: Arnd Bergmann <arnd@arndb.de>
7
8commit dce5b0bdeec61bdbee56121ceb1d014151d5cab1 upstream.
9
10The only references outside of the #ifdef have been removed, so now we
11get a warning in non-SMP configurations:
12
13 mm/kmemleak.c:1404:13: error: unused function 'scan_large_block' [-Werror,-Wunused-function]
14
15Add a new #ifdef around it.
16
17Link: http://lkml.kernel.org/r/20190416123148.3502045-1-arnd@arndb.de
18Fixes: 298a32b13208 ("kmemleak: powerpc: skip scanning holes in the .bss section")
19Signed-off-by: Arnd Bergmann <arnd@arndb.de>
20Acked-by: Catalin Marinas <catalin.marinas@arm.com>
21Cc: Vincent Whitchurch <vincent.whitchurch@axis.com>
22Cc: Michael Ellerman <mpe@ellerman.id.au>
23Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
24Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
25Cc: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
26Signed-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@@ -1373,6 +1373,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@@ -1384,6 +1385,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