From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752541AbdEILEk (ORCPT ); Tue, 9 May 2017 07:04:40 -0400 Received: from mail-pg0-f44.google.com ([74.125.83.44]:35382 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751295AbdEILEj (ORCPT ); Tue, 9 May 2017 07:04:39 -0400 From: Taeung Song To: Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org, Jiri Olsa , Namhyung Kim Subject: [PATCH v3 0/7] perf config: Bugfixes & Refactoring Date: Tue, 9 May 2017 20:04:34 +0900 Message-Id: <1494327874-25012-1-git-send-email-treeze.taeung@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, This is simple patchset for perf-config to fix small bugs and refactor code. I'd appreciate some feedback on this patchset. The code is also available at 'config/refactoring-v3' branch on git://github.com/taeung/linux-perf.git Thanks, Taeung v3: - fix a bug of no checked 'ret' in the loop in cmd_config() (Arnaldo) - modify commit log messages to be more clear (Aranaldo) - return -1 if show_spec_config() cannot show the config - initialize 'ret' with -1 instead of 0 for more compact code in cmd_config() - Add a error message when perf_config_set__new() failed in cmd_config() v2: - there is no need to consider empty config file (Arnaldo) Taeung Song (7): perf config: Handle errors from {show_spec, set}_config() in the loop perf config: Refactor the code using 'ret' variable in cmd_config() perf config: Return -1 if show_spec_config() cannot show the config perf config: Add a error message when perf_config_set__new() failed in cmd_config() perf config: Finally write changed configs on config file at a time perf config: Check whether items are from system config in set_config() perf config: Support autogeneration of config file when setting configs tools/perf/builtin-config.c | 57 +++++++++++++++++++++++++++++++-------------- tools/perf/util/config.c | 5 +--- 2 files changed, 40 insertions(+), 22 deletions(-) -- 2.7.4