Linux-mm Archive on
 help / color / Atom feed
From: Arnd Bergmann <>
To: Andrew Morton <>,
	Catalin Marinas <>
Cc: Arnd Bergmann <>,
	Vincent Whitchurch <>,
	Michael Ellerman <>,,
Subject: [PATCH] kmemleak: fix unused-function warning
Date: Tue, 16 Apr 2019 14:31:24 +0200
Message-ID: <> (raw)

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 <>
 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)
  * Scan a memory block corresponding to a kmemleak_object. A condition is

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-16 12:31 Arnd Bergmann [this message]
2019-04-16 13:24 ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-mm Archive on

Archives are clonable:
	git clone --mirror linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ \
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone