[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200315162055.yllohanldpmpe6nk@treble>
Date: Sun, 15 Mar 2020 11:20:55 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: tglx@...utronix.de, linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [RFC][PATCH 06/16] objtool: Add a statistics mode
On Thu, Mar 12, 2020 at 02:41:13PM +0100, Peter Zijlstra wrote:
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -234,6 +234,7 @@ static int decode_instructions(struct ob
> struct symbol *func;
> unsigned long offset;
> struct instruction *insn;
> + unsigned long nr_insns = 0;
> int ret;
>
> for_each_sec(file, sec) {
> @@ -268,6 +269,7 @@ static int decode_instructions(struct ob
> goto err;
>
> hash_add(file->insn_hash, &insn->hash, insn->offset);
> + nr_insns++;
> list_add_tail(&insn->list, &file->insn_list);
It's slightly more readable to do the 'nr_insns++' after the
list_add_tail().
--
Josh
Powered by blists - more mailing lists