Return-Path: Received: from mail.kernel.org ([198.145.29.99]:46022 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbgAHA6X (ORCPT ); Tue, 7 Jan 2020 19:58:23 -0500 Date: Wed, 8 Jan 2020 09:58:16 +0900 From: Masami Hiramatsu Subject: Re: [PATCH] x86: orc: fix unused-function warning Message-Id: <20200108095816.76dd48134cadc997bf4c5ece@kernel.org> In-Reply-To: <20200107213127.209139-1-arnd@arndb.de> References: <20200107213127.209139-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Arnd Bergmann Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Shile Zhang , "Peter Zijlstra (Intel)" , Josh Poimboeuf , Masahiro Yamada , linux-kbuild@vger.kernel.org, "H. Peter Anvin" , Masami Hiramatsu , Jann Horn , linux-kernel@vger.kernel.org On Tue, 7 Jan 2020 22:31:20 +0100 Arnd Bergmann wrote: > The orc unwinder contains a new warning: > > arch/x86/kernel/unwind_orc.c:210:12: error: 'orc_sort_cmp' defined but not used [-Werror=unused-function] > static int orc_sort_cmp(const void *_a, const void *_b) > ^~~~~~~~~~~~ > arch/x86/kernel/unwind_orc.c:190:13: error: 'orc_sort_swap' defined but not used [-Werror=unused-function] > static void orc_sort_swap(void *_a, void *_b, int size) > ^~~~~~~~~~~~~ > > Move the #ifdef to hide the now unused functions. > > Fixes: f14bf6a350df ("x86/unwind/orc: Remove boot-time ORC unwind tables sorting") > Signed-off-by: Arnd Bergmann Looks good to me. Reviewed-by: Masami Hiramatsu Thank you, > --- > arch/x86/kernel/unwind_orc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kernel/unwind_orc.c b/arch/x86/kernel/unwind_orc.c > index abdf8911a1fb..538152cca46b 100644 > --- a/arch/x86/kernel/unwind_orc.c > +++ b/arch/x86/kernel/unwind_orc.c > @@ -187,6 +187,7 @@ static struct orc_entry *orc_find(unsigned long ip) > return orc_ftrace_find(ip); > } > > +#ifdef CONFIG_MODULES > static void orc_sort_swap(void *_a, void *_b, int size) > { > struct orc_entry *orc_a, *orc_b; > @@ -229,7 +230,6 @@ static int orc_sort_cmp(const void *_a, const void *_b) > return orc_a->sp_reg == ORC_REG_UNDEFINED && !orc_a->end ? -1 : 1; > } > > -#ifdef CONFIG_MODULES > void unwind_module_init(struct module *mod, void *_orc_ip, size_t orc_ip_size, > void *_orc, size_t orc_size) > { > -- > 2.20.0 > -- Masami Hiramatsu