From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Zou Wei <zou_wei@huawei.com>
Cc: peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@redhat.com,
namhyung@kernel.org, linux-perf-users@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] perf tools: Use list_move instead of list_del/list_add
Date: Tue, 8 Jun 2021 09:45:13 -0300 [thread overview]
Message-ID: <YL9mWZfQoc8AP49D@kernel.org> (raw)
In-Reply-To: <1623113566-49455-1-git-send-email-zou_wei@huawei.com>
Em Tue, Jun 08, 2021 at 08:52:46AM +0800, Zou Wei escreveu:
> Using list_move() instead of list_del() + list_add().
Thanks, applied.
- Arnaldo
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.com>
> ---
> tools/perf/util/srccode.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/srccode.c b/tools/perf/util/srccode.c
> index c29edaa..476e998 100644
> --- a/tools/perf/util/srccode.c
> +++ b/tools/perf/util/srccode.c
> @@ -97,8 +97,7 @@ static struct srcfile *find_srcfile(char *fn)
> hlist_for_each_entry (h, &srcfile_htab[hval], hash_nd) {
> if (!strcmp(fn, h->fn)) {
> /* Move to front */
> - list_del(&h->nd);
> - list_add(&h->nd, &srcfile_list);
> + list_move(&h->nd, &srcfile_list);
> return h;
> }
> }
> --
> 2.6.2
>
--
- Arnaldo
prev parent reply other threads:[~2021-06-08 12:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-08 0:52 [PATCH -next] perf tools: Use list_move instead of list_del/list_add Zou Wei
2021-06-08 12:45 ` Arnaldo Carvalho de Melo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YL9mWZfQoc8AP49D@kernel.org \
--to=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=zou_wei@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).