Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1622924ybv; Fri, 21 Feb 2020 00:28:56 -0800 (PST) X-Google-Smtp-Source: APXvYqz+FPfnnNfxrvgWpYVjm1BoeVEKLfadAq55Y50pBa50DTfMNI481wNdcWoyr6xfAgTqHyDJ X-Received: by 2002:a05:6808:319:: with SMTP id i25mr1054363oie.128.1582273736108; Fri, 21 Feb 2020 00:28:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582273736; cv=none; d=google.com; s=arc-20160816; b=OaXusp9zBbyHCLjmdhT1gZ9QMbtNub9q0j1Ss4jOsuaKxXaHKXHt99iTRBp+R2ZPsE u2KPRoPBIYaDc3Cp3zJbsLVBdWrzdW7VD34QUe7oJq9eFiIY0wpjqw0vWC3ruIDItuv0 qXPBtHYqev/g5Vb+lmagBLNVawe2PxQFQcaig0awpoVeHPzNT1JbvFx0vojGu+JpYVWh D0xIDDliki9c7QfpEwskzxmkQnQFB9rrihIXFYm6uO+fAxIQDn4SD5gnwOlx6ooi0lpH FF5P83p7byAu4ka73c6a8YxJ10lk3VOelqGeiVBtJWr4kc1UvBSBGPf0voFHEoATvxxF pmJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tQ5b82YUb1iqcUUXGSXVg9rDC/8f2eUD38+iJa7LIG0=; b=YVYH4WIiA6wNn9Ai+Tf9jsSvjW1wfp/X2DtEk7gunKZH9XMbWQnD6gOYiKzi6uNz5Q a6yeDwRynKzhA4Y6W0M8NLNg8dOdhn75zTCvMNkh14WkMVj+ns5MlXjHgmkuK6n7WBUZ WMG7P02XMogTSrpfJ7t63bnaO6dDiW7EbW/NkDeeB8424OugnMhq9/zR6fIZuklI2T2c B49EXoJJCFwQDb54u6howMaiaGEOqz+FbJdVpC8U+h4MHsuYctHgi+1sCh7YcT6J+1LN w5zhCK6nOBGyHAisQj37cRit1hCH/kw2azQNz76DCRqNM8eH6vCEQyRwy0Ugh9m1S3Ci CykQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KEiblTRt; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r10si1024764otk.83.2020.02.21.00.28.44; Fri, 21 Feb 2020 00:28:56 -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; dkim=pass header.i=@kernel.org header.s=default header.b=KEiblTRt; 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 S2388755AbgBUI2E (ORCPT + 99 others); Fri, 21 Feb 2020 03:28:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:59894 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732212AbgBUIUn (ORCPT ); Fri, 21 Feb 2020 03:20:43 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F2D8E2469D; Fri, 21 Feb 2020 08:20:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273242; bh=uaqtr6l3s3vDn9atw6+mtNDLwhEDUDOlpKODIU0dLpw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KEiblTRt6QvdiQNLivGKAUlE5aLI+at24KtjP/edNWzxWZVcWjvavTf8X6APoQyfO qX9N4wBzFo5kfA+Y19grdVc8gaHgBGmn04UPX3/HXOhjGodjznTMx1/sVm7/oDnsUW W122S9dN8kNRqyB7kxe7h2bvQ70eQdFhhfvIxKbA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shile Zhang , Stephen Rothwell , Andy Lutomirski , Borislav Petkov , Josh Poimboeuf , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Sasha Levin Subject: [PATCH 4.19 099/191] x86/unwind/orc: Fix !CONFIG_MODULES build warning Date: Fri, 21 Feb 2020 08:41:12 +0100 Message-Id: <20200221072303.000088196@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072250.732482588@linuxfoundation.org> References: <20200221072250.732482588@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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