From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751040AbcGMHMP (ORCPT ); Wed, 13 Jul 2016 03:12:15 -0400 Received: from terminus.zytor.com ([198.137.202.10]:41030 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750843AbcGMHMB (ORCPT ); Wed, 13 Jul 2016 03:12:01 -0400 Date: Wed, 13 Jul 2016 00:11:36 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: acme@redhat.com, dsahern@gmail.com, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, wangnan0@huawei.com, namhyung@kernel.org, adrian.hunter@intel.com, jolsa@kernel.org, mingo@kernel.org Reply-To: namhyung@kernel.org, wangnan0@huawei.com, adrian.hunter@intel.com, acme@redhat.com, dsahern@gmail.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, hpa@zytor.com, mingo@kernel.org, jolsa@kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Remove needless includes from cache.h Git-Commit-ID: 175729fc2c5144e9eee06b3483c5c9798f7062a5 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: 175729fc2c5144e9eee06b3483c5c9798f7062a5 Gitweb: http://git.kernel.org/tip/175729fc2c5144e9eee06b3483c5c9798f7062a5 Author: Arnaldo Carvalho de Melo AuthorDate: Thu, 7 Jul 2016 11:38:09 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 12 Jul 2016 15:19:58 -0300 perf tools: Remove needless includes from cache.h The cache.h header doesn't use any of the definitions in some of the headers it includes, ditch them and fix the fallout, where files were getting stuff they needed just because they were including it, sometimes not using what it really exports at all. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-l6r2bmj8h1g3e01wr981on0n@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/arch/common.c | 1 + tools/perf/tests/llvm.c | 1 + tools/perf/ui/gtk/util.c | 1 + tools/perf/ui/helpline.c | 1 + tools/perf/ui/tui/setup.c | 2 ++ tools/perf/util/alias.c | 1 + tools/perf/util/cache.h | 3 --- tools/perf/util/levenshtein.c | 4 +++- tools/perf/util/llvm-utils.c | 2 ++ tools/perf/util/path.c | 2 ++ tools/perf/util/target.c | 1 + 11 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c index ee69668..886dd2a 100644 --- a/tools/perf/arch/common.c +++ b/tools/perf/arch/common.c @@ -1,6 +1,7 @@ #include #include #include "common.h" +#include "../util/util.h" #include "../util/debug.h" const char *const arm_triplets[] = { diff --git a/tools/perf/tests/llvm.c b/tools/perf/tests/llvm.c index cff564f..b798a4b 100644 --- a/tools/perf/tests/llvm.c +++ b/tools/perf/tests/llvm.c @@ -5,6 +5,7 @@ #include "llvm.h" #include "tests.h" #include "debug.h" +#include "util.h" #ifdef HAVE_LIBBPF_SUPPORT static int test__bpf_parsing(void *obj_buf, size_t obj_buf_sz) diff --git a/tools/perf/ui/gtk/util.c b/tools/perf/ui/gtk/util.c index 52e7fc4..00b9192 100644 --- a/tools/perf/ui/gtk/util.c +++ b/tools/perf/ui/gtk/util.c @@ -1,4 +1,5 @@ #include "../util.h" +#include "../../util/util.h" #include "../../util/debug.h" #include "gtk.h" diff --git a/tools/perf/ui/helpline.c b/tools/perf/ui/helpline.c index 700fb3c..5b74a7e 100644 --- a/tools/perf/ui/helpline.c +++ b/tools/perf/ui/helpline.c @@ -5,6 +5,7 @@ #include "../debug.h" #include "helpline.h" #include "ui.h" +#include "../util.h" char ui_helpline__current[512]; diff --git a/tools/perf/ui/tui/setup.c b/tools/perf/ui/tui/setup.c index 7dfeba0..4ea2ba8 100644 --- a/tools/perf/ui/tui/setup.c +++ b/tools/perf/ui/tui/setup.c @@ -1,3 +1,4 @@ +#include #include #include #ifdef HAVE_BACKTRACE_SUPPORT @@ -6,6 +7,7 @@ #include "../../util/cache.h" #include "../../util/debug.h" +#include "../../util/util.h" #include "../browser.h" #include "../helpline.h" #include "../ui.h" diff --git a/tools/perf/util/alias.c b/tools/perf/util/alias.c index 6c80f83..6455471 100644 --- a/tools/perf/util/alias.c +++ b/tools/perf/util/alias.c @@ -1,4 +1,5 @@ #include "cache.h" +#include "util.h" #include "config.h" static const char *alias_key; diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h index 9f90e36..512c0c8 100644 --- a/tools/perf/util/cache.h +++ b/tools/perf/util/cache.h @@ -1,11 +1,8 @@ #ifndef __PERF_CACHE_H #define __PERF_CACHE_H -#include -#include "util.h" #include "strbuf.h" #include -#include "../perf.h" #include "../ui/ui.h" #include diff --git a/tools/perf/util/levenshtein.c b/tools/perf/util/levenshtein.c index e521d15..f616e4f 100644 --- a/tools/perf/util/levenshtein.c +++ b/tools/perf/util/levenshtein.c @@ -1,5 +1,7 @@ -#include "cache.h" #include "levenshtein.h" +#include +#include +#include /* * This function implements the Damerau-Levenshtein algorithm to diff --git a/tools/perf/util/llvm-utils.c b/tools/perf/util/llvm-utils.c index 282c30f..bf7216b 100644 --- a/tools/perf/util/llvm-utils.c +++ b/tools/perf/util/llvm-utils.c @@ -3,12 +3,14 @@ * Copyright (C) 2015, Huawei Inc. */ +#include #include #include #include #include "debug.h" #include "llvm-utils.h" #include "config.h" +#include "util.h" #define CLANG_BPF_CMD_DEFAULT_TEMPLATE \ "$CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS "\ diff --git a/tools/perf/util/path.c b/tools/perf/util/path.c index cff8bf0..7c7630b 100644 --- a/tools/perf/util/path.c +++ b/tools/perf/util/path.c @@ -11,6 +11,8 @@ * which is what it's designed for. */ #include "cache.h" +#include "util.h" +#include static char bad_path[] = "/bad-path/"; /* diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c index 5898af4..8cdcf46 100644 --- a/tools/perf/util/target.c +++ b/tools/perf/util/target.c @@ -7,6 +7,7 @@ */ #include "target.h" +#include "util.h" #include "debug.h" #include