From patchwork Tue Apr 16 12:31:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 162308 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4157645jan; Tue, 16 Apr 2019 05:31:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqywSCjQeyMqbgjBNlkXOkH45IlgMPB4n9heQGUbP5ngoZmBtSamunikglBIvDfkOlKNczm/ X-Received: by 2002:a63:ef0a:: with SMTP id u10mr58775301pgh.199.1555417916661; Tue, 16 Apr 2019 05:31:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555417916; cv=none; d=google.com; s=arc-20160816; b=lekD60yDXIGq6wRm/ZzDTkPp/XGXc5ttb9m7OSF3enB0nr5c3d7F+If/OUAbpHK7Lb uTXN0lgsYLQ0io0A3Zqv3e6uyO57RAt7iQlPSTPx6wgRLfJJlrqlRB26rVZKi0yUKxRI S1lO0qaAzB55a/OJBj+bLdsBDW7ZVnP7Fhm+icCB5fz4y2mInZL9/4W/jH5OvYuuGrdE SjBK76AU0QR85bFcWfYLSAz3j+A867dnjQycs8rTTpisciJrz5xoaZl4VBh/TsYsO2NV xHjDAZVLPigcW2muAnZJW7qDrt3Qha4ubcQXP7Xr3wj1tTwB2FLgUZk5i4Bo7eSVzW4D HnsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Y/CYgzso0fI3Ij7lzAxNt+qvKgVSgCplQDjlKsz768I=; b=DnPxoBiCYgGXCdxopH5n/DS/6SOcyLZpRUS+UglpBmNtNRArntSC0Vp08Shs7ZS6PD 6afyfDUFOny8WHPQPodXQx+JzN89oGEY6ZRlkKdrH73EtdGPDeZ7c2S35tyc6x1cUuyT ufKoixdIFGAY2qIhHfuIYzumvANHJCsBdCCTL+64Gc64lWbgAMuGVdcKJcsB5+6UGTMQ vwc25gw5ZqMdcYDAp08Qe87qQ8b7OYNTy+fdPEpFjiEFS3GbJOUWxGfGTjmUGNU2OpGV 1yHtP3Ek4qmIb7j3BnB4OFO2JNph6hHAQJDxKUkf3s6h+5LdxPGYnm+zkHf/aJh6wYDI sH/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si39835513pgp.45.2019.04.16.05.31.56; Tue, 16 Apr 2019 05:31:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728644AbfDPMby (ORCPT + 30 others); Tue, 16 Apr 2019 08:31:54 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:48499 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726796AbfDPMby (ORCPT ); Tue, 16 Apr 2019 08:31:54 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1Mj831-1gbHjU3m3p-00fCGB; Tue, 16 Apr 2019 14:31:50 +0200 From: Arnd Bergmann To: Andrew Morton , Catalin Marinas Cc: Arnd Bergmann , Vincent Whitchurch , Michael Ellerman , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] kmemleak: fix unused-function warning Date: Tue, 16 Apr 2019 14:31:24 +0200 Message-Id: <20190416123148.3502045-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:1EvAL0ojU2Frr4q+8XD0ubRvQzid0tVwlNCSoNZpPcdhs4cXgDa er9JnhpiZ6+hzDmyNo90eKhBWtxDpCdIn6jqy4JCU9DrGMckNRieIrMfro3+wbktoidofOa 2tVttJbXVZWG//pdNS5j3Y633M1A+mZTSjYVaRthJnUD7c0O1yizfkfnXNRSg4ujEr9MH4x AyUceR85JAEo3Yda+Rw5Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:yJV3e/orw2s=:nbtkNbl92Oed8LdUTP7aNQ 8K1IijsNIuBoy5Titcdi7g2zqv5QUY9rX8tRXQdW8aqtnn15cD1G01zd7WNx3TfDL9xvhfIFG 1ItPv7GKidKCQgzBFk1xM3iBuN5nIyNOTzla1ypOnT5yGAqFwo2y88e0ZE21QSHMTTuKprRha ys0NCnA/4V9Q4fAq0Gdg7oBKDNIvx6FuWon6Zi/XmwyIElCZCoG4DJiEiATKCJB8GzOtgN34m r6j48PcG6ZM5h+Xk95gtJhBgOBO/TOsBYZXWH79pFS9v9SWRNHAvCYu26GdxorKhy31maOvff 954yn9NwEFJfsY1WYLJhfc9YvHYSDT+tidCsA0Z/ZNXVEfR5BGxuZCxzG8sBFdkKhdxDLaHo9 sW+I/CRJMPxfZmXxYMmvDxNzeNTfnenr+P5xnRYKskXx6f/cdzplWjDgSExfUMqgtcgiYAh1J gBTzsKsuuHXqjpcxXOm+yOTP1IZjeL4ZGY2nLzwjztRU5Ywp6PaSc5iql7ZH2l9EKV+olJ7/6 2b4Iw/mWze/q9s1nJMhy1SBE270oK4ErvsMcyfabDRW/2nN0l8rEom5HVHJ+05QIxKrjCAaux qJH6kaXBYfiYJ1DvZIhcprrl+V8ulpOm2ESXBwiFzydWz1Fx0O0Re0wr22N1d6Wq+9zGsYOQP 7/PyT2MvXJ68UXl+/kCsbT2AYesGM637PGllo2Af6HowfEH6kwoBlchorWR3rD9byv/nWt7Un QpjQ4Ok9B5p1irYvm6AhvABLFng+3ZJ9Tn3SFg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 2.20.0 Acked-by: Catalin Marinas 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