[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1453737722-1960270-1-git-send-email-arnd@arndb.de>
Date: Mon, 25 Jan 2016 17:00:10 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
"David S. Miller" <davem@...emloft.net>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: linux-arm-kernel@...ts.infradead.org,
Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org
Subject: [PATCH] kprobes: make wait_for_kprobe_optimizer as __maybe_unused
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 <arnd@...db.de>
---
kernel/kprobes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.7.0
Powered by blists - more mailing lists