From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751907AbdIMHrw (ORCPT ); Wed, 13 Sep 2017 03:47:52 -0400 Received: from terminus.zytor.com ([65.50.211.136]:56901 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751094AbdIMHrs (ORCPT ); Wed, 13 Sep 2017 03:47:48 -0400 Date: Wed, 13 Sep 2017 00:45:42 -0700 From: tip-bot for Taeung Song Message-ID: Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, acme@redhat.com, jolsa@kernel.org, hpa@zytor.com, namhyung@kernel.org, treeze.taeung@gmail.com, tglx@linutronix.de Reply-To: treeze.taeung@gmail.com, tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, acme@redhat.com, namhyung@kernel.org, jolsa@kernel.org, hpa@zytor.com In-Reply-To: <1504754325-9724-1-git-send-email-treeze.taeung@gmail.com> References: <1504754325-9724-1-git-send-email-treeze.taeung@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf config: Check not only section->from_system_config but also item's Git-Commit-ID: cba225d6eeaf00bd8181a851fbaa7b8716337e0b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: cba225d6eeaf00bd8181a851fbaa7b8716337e0b Gitweb: http://git.kernel.org/tip/cba225d6eeaf00bd8181a851fbaa7b8716337e0b Author: Taeung Song AuthorDate: Thu, 7 Sep 2017 12:18:45 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 12 Sep 2017 12:35:11 -0300 perf config: Check not only section->from_system_config but also item's Currently section->from_system_config is being checked multiple times. item->from_system_config should be checked instead, when iterating thru the items in a section. Fix it. Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1504754325-9724-1-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-config.c b/tools/perf/builtin-config.c index 3ddcc6e..a1d82e3 100644 --- a/tools/perf/builtin-config.c +++ b/tools/perf/builtin-config.c @@ -59,7 +59,7 @@ static int set_config(struct perf_config_set *set, const char *file_name, fprintf(fp, "[%s]\n", section->name); perf_config_items__for_each_entry(§ion->items, item) { - if (!use_system_config && section->from_system_config) + if (!use_system_config && item->from_system_config) continue; if (item->value) fprintf(fp, "\t%s = %s\n",