Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4065787pxj; Tue, 8 Jun 2021 05:48:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXqK5RJs2EreDUdMDb9zDuK60WKzAKPkH/Qby/qaQdjdILbDJGSLPoogARFR0lEv4bmkms X-Received: by 2002:a17:906:25db:: with SMTP id n27mr22760878ejb.170.1623156507523; Tue, 08 Jun 2021 05:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623156507; cv=none; d=google.com; s=arc-20160816; b=Hn0qZ3uCWRdBl8GRV2gZ/SJ2aEWFRRDpdRpsMbJSL68xlYiB+tTk2BpeFOQ46xezPO vPxYVzvPS5MLMDG8vNVYsWxJsycRCil8V/5fBjOqXM1HcrTESxt99aUWUPUzxF2uFohV p3pJxDcqiKB1CzOP7MIb177h+qw3E2Ye0N9P8SZnZpTRrpGrAFxe3135f+aOYM+WoZp3 EL5p1MUWLd1OQ33fwqF1G5H62ukxt9J0T8p1E7SGw1GotwT0xb1jFGi3gQDcbFnt+mhL QPDoE7Mu2JJm9BqTB4bP8KS/uGsuuZ5utjKb6Dpn5Nahu8jk3Mn15/+T6W/xndm9c8Jo QKvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Fdl4WI0/pveMI+KsPPzps0YiX3eD5GBtBU+Etpq/keQ=; b=cbqQUsRATPMF6tggKSMROWsfhuUwmZAft+DxJ4YHbfMNXatrE2md9XGTjRe0d3Z0vV UGDZfLrsAG1d+FnoA35H4xEv21DQS4n+mI3U5gzprPjuAOsbS57CzvmCtNketQuMWC64 eUOzV6PBVyzTTgYJ6OtWCYZDASvF7RNuzYFLv8/tqpoYukFjZoW8Hfsi/WLFDf7lnIJ1 zzFTw5p/VWFBMw+5Kb1Mnoann8NXBsnK3kyz2vftDH7/iuO57/9ZT4H4cQABQyufN2vC oR+8kylMqNilQIr/k18g6rFBN4hyMvjxVaaJ8sD9Jhtd6YZqiJ4Hs8/eqUzuAKlnp31e gVMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hSowGWz0; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e12si12631964ejl.676.2021.06.08.05.48.04; Tue, 08 Jun 2021 05:48:27 -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=@kernel.org header.s=k20201202 header.b=hSowGWz0; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232803AbhFHMrM (ORCPT + 99 others); Tue, 8 Jun 2021 08:47:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:45324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232786AbhFHMrJ (ORCPT ); Tue, 8 Jun 2021 08:47:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9626860FF0; Tue, 8 Jun 2021 12:45:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623156316; bh=lpXjs35ijhxfI9tobNyQoPR7rS+pnNx3itV//vsGf7w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hSowGWz0ETjd4pY9hwO/ojzV/pgpzoEjqktf6M/A9SBpXgu5/qQ5FbA+fUdSpGgaf reVgKwMPj1o60b9lO/ZPJJispGtjDWAFZvd6RDCDpykpAT2o2ZleCS7skouavJWdSe T6DnWkNBQmdJUvPZhYWNSNh07E/KNi+o+iRki5DfxMliTBe1EwHZ+fdBI9TTasTjYS 0x0awVTsAVuj6Jw9ric0VxQ035DxbM7wnwV7IrpGqCNuaqZqkiAMZtmBLIsGap40JY n+rCWIEVfwTDcD2rF2vUGrw2raGE3e965Xl0i/4i6aBIzQ8UB+CR3LHIFat0Wl2pY0 XjxzUw8AtDWLA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id D648540B1A; Tue, 8 Jun 2021 09:45:13 -0300 (-03) Date: Tue, 8 Jun 2021 09:45:13 -0300 From: Arnaldo Carvalho de Melo To: Zou Wei 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 Message-ID: References: <1623113566-49455-1-git-send-email-zou_wei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1623113566-49455-1-git-send-email-zou_wei@huawei.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Zou Wei > --- > 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