Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3803003ybz; Tue, 28 Apr 2020 00:20:31 -0700 (PDT) X-Google-Smtp-Source: APiQypL+0+laYbKMIzJU+nYZU9BQ/aqNERgOj0DFmTHDYZKu+QuDefb302WXDPXE+O81/EkGtTmo X-Received: by 2002:a17:906:1d13:: with SMTP id n19mr1397121ejh.287.1588058431512; Tue, 28 Apr 2020 00:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588058431; cv=none; d=google.com; s=arc-20160816; b=MWpsOQy328G/HVPYrKOvWu9Yfw/caXz0Z/SFh/S8hOnEdEiBrgAvIVvMVKJMd46MyN 2Fq6Rwl9azBYP4lJRxay1CsTkc0BGX/56Ea0KyvkKP1lXoGpj9fI48mCsXM1blbooGmA ihVloLmgKrDHmGOsMgloF3DRQchcdFZj0rinclz7Vgv7HM2WyPZRxAmU1FXxwmR4lvkD b+tCPtwinA8Kj815K4FVu5pUIu/x690av9+Y1018Dwfe3kbsm1iO69sI1K6mfQrLk4SZ rx1ZBs4ahaMHvCxLj4aPPJuBZ3+L37Wr6Vt8RB8ksl91Mm9NS0Y2XiJ2+iW6S5pABjOH 8eVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=0B3gnfAi+vC2wNO8K4I/DfPuZmGhtWSGMZXgFSeqqJA=; b=W6nvP8SteOrdnPXFsxN4UyLiTXYJORGBOI2jnsRT7cfU6EUbUwra2lwrrNzTCz5Cm2 vTQI+azwFI3Ybf3nnZoZhkf9Ch5hNSOmsxUTEocOWjc8uuaoCNa1KqhdOAjf2jYhsSoL SI7ea2HTdV4jX+YtT7PHjEkVjIIpTT/nEjVtkNlKUXaRI/OGeylu6UOsk14dXoWi6IA0 4CJXOy3iRN0am3Mwe/rtPFAkAD096CY0vH7T3xMHRGoRCBETlSjzLuLQSvVHiOMOIDI+ xDm9IE3KOBcBxkPNp/Q1UuWQyaF8y7RUsg+1IO5RxqKgRAmNz4zcV2WeS0DtCgC1gnQj ZosA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TmnTM02F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j22si1312269ejm.490.2020.04.28.00.20.08; Tue, 28 Apr 2020 00:20:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TmnTM02F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725917AbgD1HQw (ORCPT + 99 others); Tue, 28 Apr 2020 03:16:52 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:32768 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725867AbgD1HQw (ORCPT ); Tue, 28 Apr 2020 03:16:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588058211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0B3gnfAi+vC2wNO8K4I/DfPuZmGhtWSGMZXgFSeqqJA=; b=TmnTM02FZkvw3FiJSOb01mbRKqrPYsYi7yD06BBxEQObplgrgy0Rs95LQBED7sekuyiaPW hmXUBNJ6Lf1JZuAZ6GttsXi34IOFeNyiDIcuM0Y6hPQKLNHTRN6j7JRzzxXFzkOb2SvHOm Vx+FnF6Mja54BCYfNYF456Ug8sM76Uw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-40-NMKKXlh1OaaR_bN8nV9F5A-1; Tue, 28 Apr 2020 03:16:45 -0400 X-MC-Unique: NMKKXlh1OaaR_bN8nV9F5A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9C04F107ACCD; Tue, 28 Apr 2020 07:16:43 +0000 (UTC) Received: from treble (ovpn-112-209.rdu2.redhat.com [10.10.112.209]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4814F5C1B2; Tue, 28 Apr 2020 07:16:41 +0000 (UTC) Date: Tue, 28 Apr 2020 02:16:40 -0500 From: Josh Poimboeuf To: Stephen Rothwell Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , Linux Next Mailing List , Linux Kernel Mailing List Subject: [PATCH] x86/unwind/orc: Move ORC sorting variables under CONFIG_MODULE Message-ID: <20200428071640.psn5m7eh3zt2in4v@treble> References: <20200428162910.0dee6f52@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200428162910.0dee6f52@canb.auug.org.au> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following warnings seen with !CONFIG_MODULE: arch/x86/kernel/unwind_orc.c:29:26: warning: 'cur_orc_table' defined but not used [-Wunused-variable] 29 | static struct orc_entry *cur_orc_table = __start_orc_unwind; | ^~~~~~~~~~~~~ arch/x86/kernel/unwind_orc.c:28:13: warning: 'cur_orc_ip_table' defined but not used [-Wunused-variable] 28 | static int *cur_orc_ip_table = __start_orc_unwind_ip; | ^~~~~~~~~~~~~~~~ Fixes: 153eb2223c79 ("x86/unwind/orc: Convert global variables to static") Reported-by: Stephen Rothwell Signed-off-by: Josh Poimboeuf --- arch/x86/kernel/unwind_orc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/unwind_orc.c b/arch/x86/kernel/unwind_orc.c index 0ebc11a8bb45..5b0bd8581fe6 100644 --- a/arch/x86/kernel/unwind_orc.c +++ b/arch/x86/kernel/unwind_orc.c @@ -24,10 +24,6 @@ extern struct orc_entry __stop_orc_unwind[]; static bool orc_init __ro_after_init; static unsigned int lookup_num_blocks __ro_after_init; -static DEFINE_MUTEX(sort_mutex); -static int *cur_orc_ip_table = __start_orc_unwind_ip; -static struct orc_entry *cur_orc_table = __start_orc_unwind; - static inline unsigned long orc_ip(const int *ip) { return (unsigned long)ip + *ip; @@ -192,6 +188,10 @@ static struct orc_entry *orc_find(unsigned long ip) #ifdef CONFIG_MODULES +static DEFINE_MUTEX(sort_mutex); +static int *cur_orc_ip_table = __start_orc_unwind_ip; +static struct orc_entry *cur_orc_table = __start_orc_unwind; + static void orc_sort_swap(void *_a, void *_b, int size) { struct orc_entry *orc_a, *orc_b; -- 2.21.1