Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp632612ybl; Wed, 8 Jan 2020 03:19:54 -0800 (PST) X-Google-Smtp-Source: APXvYqxZn0w2WIO1pYMGuUqV52j2RKblq7MIc8R+D2fbRG9JwKPf6m/d1NOWSXQxUVhFyMcpPVpQ X-Received: by 2002:a05:6808:9ba:: with SMTP id e26mr2663223oig.81.1578482394005; Wed, 08 Jan 2020 03:19:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578482394; cv=none; d=google.com; s=arc-20160816; b=o4cA7VHwbnFEl82JL/0E1AYw7okfAOUZN55WDlSG4bnaXFUUeDSiFzBjWIyyoBNp9J lxhL+UD3stHacjoPIAseMItBkmraXaxuM07vJE84fNoAw1w9sIVw0g+QfPiOtEHefwfy h4m7OPo4Po/5Eu+AbCzPPkGcnvVZb2Q1DZy5RFEsq5H8qZwQF4O1KtoEs88Co2J5CGpU K6Mv6tY/LPUJjQHDSDT5e9nL6FZsTRP6bE1dvPvwE2t9Vs9r6SYD/PB9O10rhZeBiEqw QyWgWLwegz6Wa0Pw7KlyCTwUFfPZnV11bczFmn7LZhpDlDWjW+D3gSHq2SJ694hcqfhF 1iPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=VI4N9HH9zbISswE+EbNO7QzNH2XWQmDkfiwXUb1J9Io=; b=KtbYWlUOAHBBRkul2OXphekFFZ8EliUYF03RniB8LCaSqaFq+UPV4wY3aMRpchM+85 jSPVHlNjxM4VLr6v3y3Z67nb1zxreFWruBh6ROHL/RnwJKb315M1cNLVNp5uQvtXJ7oG 2aI+M6j187t3Ae5LvG0l33rDxb6nuFo9UqIynqrY2iYPv11A1sCGB/WFfS5wZviGhErK /cEQvf4CG5kR0N+glpQvejHFCX6YOomrrYOfos/Gw6XGE400puXL+IPFZi6AE5TzslOA WT0EWmLIsdkwjt9+kiQsUrk1c7uG6kBQpoc5Uq8U3cDQKZ4cgJjY/aCLnVQrXrxSM9/o G4mw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4si1557410oix.48.2020.01.08.03.19.42; Wed, 08 Jan 2020 03:19:53 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727564AbgAHKsf (ORCPT + 99 others); Wed, 8 Jan 2020 05:48:35 -0500 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:42830 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbgAHKsf (ORCPT ); Wed, 8 Jan 2020 05:48:35 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=shile.zhang@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0Tn9hx8y_1578480506; Received: from ali-6c96cfdd1403.local(mailfrom:shile.zhang@linux.alibaba.com fp:SMTPD_---0Tn9hx8y_1578480506) by smtp.aliyun-inc.com(127.0.0.1); Wed, 08 Jan 2020 18:48:27 +0800 Subject: Re: [PATCH] x86: orc: fix unused-function warning To: Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "Peter Zijlstra (Intel)" Cc: Josh Poimboeuf , Masahiro Yamada , linux-kbuild@vger.kernel.org, "H. Peter Anvin" , Masami Hiramatsu , Jann Horn , linux-kernel@vger.kernel.org References: <20200107213127.209139-1-arnd@arndb.de> From: Shile Zhang Message-ID: Date: Wed, 8 Jan 2020 18:48:26 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <20200107213127.209139-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, Thanks for you work! But sorry for I have been fix this warning via a delta-patch as following: https://lore.kernel.org/lkml/157838258393.30329.5371781726464192052.tip-bot2@tip-bot2/ FYI. BRs Shile On 2020/1/8 05:31, 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 > --- > 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) > {