From patchwork Mon Jan 25 16:00:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101109 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1442722lbb; Mon, 25 Jan 2016 08:03:14 -0800 (PST) X-Received: by 10.66.55.73 with SMTP id q9mr26888657pap.44.1453737794327; Mon, 25 Jan 2016 08:03:14 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f85si34461992pfj.176.2016.01.25.08.03.13; Mon, 25 Jan 2016 08:03:14 -0800 (PST) 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 S933399AbcAYQDJ (ORCPT + 30 others); Mon, 25 Jan 2016 11:03:09 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:57520 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932907AbcAYQDB (ORCPT ); Mon, 25 Jan 2016 11:03:01 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0MN62C-1aUMN52TRg-006cqi; Mon, 25 Jan 2016 17:02:15 +0100 From: Arnd Bergmann To: Ananth N Mavinakayanahalli , Anil S Keshavamurthy , "David S. Miller" , Masami Hiramatsu Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] kprobes: make wait_for_kprobe_optimizer as __maybe_unused Date: Mon, 25 Jan 2016 17:00:10 +0100 Message-Id: <1453737722-1960270-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:HfwFBDasqMDV32jlqvplR2H+/Wig06k71OekrQ5Kw95lJ6pnDE7 MpmMr+NTPGBaOn+t6TKMVG0r1j5fIjSre+K/iBHrpBQ7CILjtJ3ZN5odQxy0D649K5M4DCg DnnOVP3XgK8BUyHG7pc1reEliZJeOkcwiyJY68q84ffQlBLH0/nOaXRVOVtutsRHL+h5Yzg fnkdrXgQjimFMt+uXZ6oQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:sZVK90JlmnU=:2AUoY9TMLe9qpws+DNOepc w9re9+al0R9gkaYeXAWWAhE9kYaC3/Yn3INd7XLUoxESim0eU8Sxe7cBOHsKJOtqoROXeqpKX GiJFi9RF9B6Wt6K6Ddv6CVQCDL4VJMArSbeYycuRhlrFrb68NOyJ+ypeGBBc7XwJbYlm4McVr LluEMMRkQt/7hpbm45PTzic3E6NNILjC8zD1LMZxtjIsnXad/TGzwtattMihoWtjpVPaXCRvJ ArPVqfLdN8SYqAhC64zP5XlQ619IQcerbsc2KtFuUZhdI7/KMRKKqxcddthLDW5L6EzsUFEca 4ZY5L2R+gxl7B8cfsniFKTK/4/1Mp9xD0jG4bixb4rv8q8biWJR1uD08lci7lKseHOP9tNqz3 lvwmU4V7tvMl7SP/mTFmX+qKJQ36XBToanUqZaVJGnK1pMuuAcfJ6KJrA4ysi/eyAQlRi6IIx Pk2V433ff+raHKCr8BnYKr+KnC+eSogkF3rC176D7iyVlpkMjWSb/AHSM+6NQWkfCTNvARHiM jG77a5ystWxH5di8xZKVJgtTMk4sEtf1s4isHqNbFIgsUK7ve73preT7Td14hyqgoL3ECAz0g 3lIEs7FI30ppH9Wz/8qWv7u3JHpW6AgxY0ccEqEwKqyt3GyTtQ/2yxGfasFi0c9600f/VZX5E IvEIJh584xnQhoDZe9UQF1XAv2rR4/1Erpcc7Dn+r7Nvx0cPMoch130TaEjgABhR3NfQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wait_for_kprobe_optimizer is only used when CONFIG_SYSCTL or CONFIG_DEBUG_FS is enabled, otherwise we get a build warning kernel/kprobes.c:566:13: error: 'wait_for_kprobe_optimizer' defined but not used [-Werror=unused-function] This marks the function as __maybe_unused to shut up that warning. We could do also add more #ifdef, but that would be a little more ugly in this case. Signed-off-by: Arnd Bergmann --- kernel/kprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/kernel/kprobes.c b/kernel/kprobes.c index d10ab6b9b5e0..12c0e0a02a6e 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -563,7 +563,7 @@ static void kprobe_optimizer(struct work_struct *work) } /* Wait for completing optimization and unoptimization */ -static void wait_for_kprobe_optimizer(void) +static void __maybe_unused wait_for_kprobe_optimizer(void) { mutex_lock(&kprobe_mutex);