From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752452AbcFJGUu (ORCPT ); Fri, 10 Jun 2016 02:20:50 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33067 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750900AbcFJGUs (ORCPT ); Fri, 10 Jun 2016 02:20:48 -0400 Subject: Re: [PATCH v8 2/5] perf config: Bring declarations about config from util/cache.h to util/config.h To: Arnaldo Carvalho de Melo References: <1465389413-8936-1-git-send-email-treeze.taeung@gmail.com> <1465389413-8936-3-git-send-email-treeze.taeung@gmail.com> <20160609132957.GI11589@kernel.org> Cc: linux-kernel@vger.kernel.org, Jiri Olsa , Namhyung Kim , Ingo Molnar , Peter Zijlstra , Alexander Shishkin , Masami Hiramatsu , Wang Nan , Jiri Olsa From: Taeung Song Message-ID: <575A5C3B.2010804@gmail.com> Date: Fri, 10 Jun 2016 15:20:43 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160609132957.GI11589@kernel.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Arnaldo :) Thank you for your review. On 06/09/2016 10:29 PM, Arnaldo Carvalho de Melo wrote: > Em Wed, Jun 08, 2016 at 09:36:50PM +0900, Taeung Song escreveu: >> Lately util/config.h has been added >> but util/cache.h has declarations of functions >> and extern variable for config features. >> >> To manage codes about configuration at one spot, move them >> to util/config.h and util/cache.h include util/config.h >> >> Cc: Alexander Shishkin >> Cc: Jiri Olsa >> Cc: Masami Hiramatsu >> Cc: Namhyung Kim >> Cc: Wang Nan >> Signed-off-by: Taeung Song >> --- >> tools/perf/util/cache.h | 13 +------------ >> tools/perf/util/config.h | 12 ++++++++++++ >> 2 files changed, 13 insertions(+), 12 deletions(-) >> >> diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h >> index 0d814bb..cd8cd4d 100644 >> --- a/tools/perf/util/cache.h >> +++ b/tools/perf/util/cache.h >> @@ -7,6 +7,7 @@ >> #include >> #include "../perf.h" >> #include "../ui/ui.h" >> +#include "config.h" > > Why have you added that? Are those config functions used in cache.h? > Yes, it does. Many source files include cache.h e.g. builtin-annoate.c, util/color.c, builtin-report.c and etc. And They can use perf_config() function including this header file. So, If I totally eliminate not only declarations about config but also #include "util/config.h" at util/cache.h, we should add '#include "util/config.h"' to each source file that need perf_config() overall. But IMHO, if cache.h include config.h, we don't need to find source files that use perf_config(). Thanks, Taeung