Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp5008406ybb; Tue, 24 Mar 2020 09:15:51 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvKr38qicyVLsbam3CbQlK0lTyqvDqQl6tWq8r5k4XNHg29L/2gDqPZsg62qm0FXxj/XAVv X-Received: by 2002:aca:5317:: with SMTP id h23mr4120369oib.33.1585066550037; Tue, 24 Mar 2020 09:15:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585066550; cv=none; d=google.com; s=arc-20160816; b=UIcMT4N9dTgF2CMvZh07SHkVTfiPirEndFJQcT6KlF7ysQVxXnOaUaJsNGqkqD+br3 WGit9PF3K5ovR/3vk+OahyKhbLdLPduPHoSL7eJWbjme9K/hvINPeavMXdeBhk1uc+nr BzX6ElHy1HLv7OQcsQUHWDRCHio4CA2+rpBS7HWJLqLG5LQXYxSNr21KcvLAAvuoKqQu DFUQgjjYnTMarmuj6/4YC2VGHAo/f2Calfc1XLHfzp8vWJfoOVdLUJGX20shxRZ8jDlQ N8AMiaDMkMe3rI26nyCWMEZfdj38iERa3vrWcu8B1lvi7Ab4hHsHrfyktL+tItyKjtM3 wYtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:subject:cc:to :from:date:user-agent:message-id:dkim-signature; bh=U/Z93ID0Ley3uabUn6Av4k+K52bsSIKdSRKwQpkQdic=; b=pLRXOuZvvnm8ppDa8MhLokNPYW0o6wK0NQNm8pXgnwq5bm92KSdSUd4Wz0E2s8gmb/ IN9e7jlb7WRVpCPj+8pbW35Eh85OyA2g0JYFAa/PB28v9IULlzM7OLSQwjm3vdcm/u+n pcOSqxrwKTgj/qq0X0EBZYe6ZvRMu1CjJ+UcbBm3EcE8Jq+Z93P6BOSSm4b/HD+WrX8f JYqtaYPgl4FcPCvT0I6KhEtWk8+W980RWxJ8xThCwHhJQGZtg5qtmBR4DsOCcaonN7Ie OT1Mt9wihirb4KeBkahgSdQfeJR4W8y50BOrYS0IXA2zebKJC4cNV0lbf2Q2VsjybLPk jCqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Wb5HwDO1; 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 h2si789044oop.51.2020.03.24.09.15.35; Tue, 24 Mar 2020 09:15:50 -0700 (PDT) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Wb5HwDO1; 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 S1727948AbgCXQLf (ORCPT + 99 others); Tue, 24 Mar 2020 12:11:35 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:50986 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727634AbgCXQLf (ORCPT ); Tue, 24 Mar 2020 12:11:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-Id:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=U/Z93ID0Ley3uabUn6Av4k+K52bsSIKdSRKwQpkQdic=; b=Wb5HwDO1V86ruJz1gq7Ry7JLZ1 VcWhGpds5RujG52EdswQmRtNlLpdZSFrxjZDH/AJs/pyC52308uTG4WvxPDeeMDUTrLf0NslGAGyb fGhxdQ0VHTA6sd/QHan6Uxw7SA2O/XsWlTQ0WHSBekq/UmklEtJRsSlEyZhs14gW2EIpPQ3x8KWUz yldkv81KbTp4loLPUHMLsbYGelr0cXst04rxyOlMN7R6zn5Xfl0ElaUFZvc06zYLivKgVRTN0rNuR vBM9PRLgwAbdl7Z6ZTZCzDazIYY/B1H2ixwnoabvqq8iWgzusaKxGecyHJpC6MS7iRC0RqnaQ7jzY 0eoMMUtw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jGm9K-0000BS-9f; Tue, 24 Mar 2020 16:11:30 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 31477306099; Tue, 24 Mar 2020 17:11:28 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id 1FCEB29A490F4; Tue, 24 Mar 2020 17:11:28 +0100 (CET) Message-Id: <20200324160924.083720147@infradead.org> User-Agent: quilt/0.65 Date: Tue, 24 Mar 2020 16:31:16 +0100 From: Peter Zijlstra To: tglx@linutronix.de, jpoimboe@redhat.com Cc: linux-kernel@vger.kernel.org, x86@kernel.org, peterz@infradead.org, mhiramat@kernel.org, mbenes@suse.cz, brgerst@gmail.com Subject: [PATCH v3 03/26] objtool: Rename func_for_each_insn_all() References: <20200324153113.098167666@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that func_for_each_insn() is available, rename func_for_each_insn_all(). This gets us: sym_for_each_insn() - iterate on symbol offset/len func_for_each_insn() - iterate on insn->func Signed-off-by: Peter Zijlstra (Intel) Acked-by: Josh Poimboeuf --- tools/objtool/check.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -72,7 +72,7 @@ static struct instruction *next_insn_sam return find_insn(file, func->cfunc->sec, func->cfunc->offset); } -#define func_for_each_insn_all(file, func, insn) \ +#define func_for_each_insn(file, func, insn) \ for (insn = find_insn(file, func->sec, func->offset); \ insn; \ insn = next_insn_same_func(file, insn)) @@ -165,7 +165,7 @@ static bool __dead_end_function(struct o if (!insn->func) return false; - func_for_each_insn_all(file, func, insn) { + func_for_each_insn(file, func, insn) { empty = false; if (insn->type == INSN_RETURN) @@ -180,7 +180,7 @@ static bool __dead_end_function(struct o * case, the function's dead-end status depends on whether the target * of the sibling call returns. */ - func_for_each_insn_all(file, func, insn) { + func_for_each_insn(file, func, insn) { if (is_sibling_call(insn)) { struct instruction *dest = insn->jump_dest; @@ -425,7 +425,7 @@ static void add_ignores(struct objtool_f continue; } - func_for_each_insn_all(file, func, insn) + func_for_each_insn(file, func, insn) insn->ignore = true; } } @@ -1082,7 +1082,7 @@ static void mark_func_jump_tables(struct struct instruction *insn, *last = NULL; struct rela *rela; - func_for_each_insn_all(file, func, insn) { + func_for_each_insn(file, func, insn) { if (!last) last = insn; @@ -1117,7 +1117,7 @@ static int add_func_jump_tables(struct o struct instruction *insn; int ret; - func_for_each_insn_all(file, func, insn) { + func_for_each_insn(file, func, insn) { if (!insn->jump_table) continue;