linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kmemleak: fix unused-function warning
@ 2019-04-16 12:31 Arnd Bergmann
  2019-04-16 13:24 ` Catalin Marinas
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2019-04-16 12:31 UTC (permalink / raw)
  To: Andrew Morton, Catalin Marinas
  Cc: Arnd Bergmann, Vincent Whitchurch, Michael Ellerman, linux-mm,
	linux-kernel

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.

Fixes: 298a32b13208 ("kmemleak: powerpc: skip scanning holes in the .bss section")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 mm/kmemleak.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 6c318f5ac234..2e435b8142e5 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -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.
  */
+#ifdef CONFIG_SMP
 static void scan_large_block(void *start, void *end)
 {
 	void *next;
@@ -1412,6 +1413,7 @@ static void scan_large_block(void *start, void *end)
 		cond_resched();
 	}
 }
+#endif
 
 /*
  * Scan a memory block corresponding to a kmemleak_object. A condition is
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-16 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-16 12:31 [PATCH] kmemleak: fix unused-function warning Arnd Bergmann
2019-04-16 13:24 ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).