From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60769C2BA83 for ; Fri, 14 Feb 2020 17:07:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38BE7206CC for ; Fri, 14 Feb 2020 17:07:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581700033; bh=uaqtr6l3s3vDn9atw6+mtNDLwhEDUDOlpKODIU0dLpw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=uPK+Usp24bVhswPyrdtvm3uAFdtQvu2SukX+xuU0sA0ctaRNDV120WX1PFPYtIlMv txj1sLn1RcB+fZR2xBck3GiUuB3urOhQ7LAb88/ahgioH4xYnojnxXLi6wsivAf0SA nHQzPdPPu5PbGzmJZemYN2jJS/WSeZo58h+VY2FM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388578AbgBNRHI (ORCPT ); Fri, 14 Feb 2020 12:07:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:44232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403967AbgBNQOh (ORCPT ); Fri, 14 Feb 2020 11:14:37 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 590F2246D2; Fri, 14 Feb 2020 16:14:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581696876; bh=uaqtr6l3s3vDn9atw6+mtNDLwhEDUDOlpKODIU0dLpw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mao162NErL4fGFozRCPP1t3bjqxG7aoDEhlkiE/L/GfkG08MlFfXhkkrLi76BFEJy Xsu+/vuOGjKIXUtvhQxmhlTPOy1MTZzVlf93EhbtDV0zuVzu7pxP1GEIv9aqDr6GcN r7Am1uGUhWjkPoMkgut4VizPQwG15Gc2GIC0rfAI= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Shile Zhang , Stephen Rothwell , Andy Lutomirski , Borislav Petkov , Josh Poimboeuf , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Sasha Levin Subject: [PATCH AUTOSEL 4.19 132/252] x86/unwind/orc: Fix !CONFIG_MODULES build warning Date: Fri, 14 Feb 2020 11:09:47 -0500 Message-Id: <20200214161147.15842-132-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214161147.15842-1-sashal@kernel.org> References: <20200214161147.15842-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Shile Zhang [ Upstream commit 22a7fa8848c5e881d87ef2f7f3c2ea77b286e6f9 ] To fix follwowing warning due to ORC sort moved to build time: arch/x86/kernel/unwind_orc.c:210:12: warning: ‘orc_sort_cmp’ defined but not used [-Wunused-function] arch/x86/kernel/unwind_orc.c:190:13: warning: ‘orc_sort_swap’ defined but not used [-Wunused-function] Signed-off-by: Shile Zhang Reported-by: Stephen Rothwell Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/c9c81536-2afc-c8aa-c5f8-c7618ecd4f54@linux.alibaba.com Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- arch/x86/kernel/unwind_orc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/unwind_orc.c b/arch/x86/kernel/unwind_orc.c index 89be1be1790c4..a3cb70fbe941a 100644 --- a/arch/x86/kernel/unwind_orc.c +++ b/arch/x86/kernel/unwind_orc.c @@ -176,6 +176,8 @@ 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; @@ -218,7 +220,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.1