perf env: Remove env.h from other headers where just a fwd decl is needed
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 29 Aug 2019 20:10:59 +0000 (17:10 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 31 Aug 2019 22:10:40 +0000 (19:10 -0300)
And fixup the fallout of c files not building due to now missing
headers.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-sw8k3kpla98pr3rqypbjk9hf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/common.h
tools/perf/tests/mem2node.c
tools/perf/util/cputopo.h
tools/perf/util/mem2node.c
tools/perf/util/mem2node.h

index c298a446d1f6f8f0a626032208565b822cd6abbd..e965ed8bb32847ce3ae1a4fdc01ee660dcb6bd64 100644 (file)
@@ -2,7 +2,9 @@
 #ifndef ARCH_PERF_COMMON_H
 #define ARCH_PERF_COMMON_H
 
-#include "../util/env.h"
+#include <stdbool.h>
+
+struct perf_env;
 
 int perf_env__lookup_objdump(struct perf_env *env, const char **path);
 bool perf_env__single_address_space(struct perf_env *env);
index 73b2855acaf4274c78ce6f2236eeaef35b63e0ea..7672ade70f201227a988b54a4f32908143fc5bc8 100644 (file)
@@ -1,10 +1,12 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <linux/compiler.h>
 #include <linux/bitmap.h>
+#include <linux/kernel.h>
 #include <linux/zalloc.h>
 #include <perf/cpumap.h>
 #include "cpumap.h"
 #include "debug.h"
+#include "env.h"
 #include "mem2node.h"
 #include "tests.h"
 
index bae2f1d418561aa6a1e4382d7154a376d4a82b7c..7bf6b811f715ea329759486168822cc00c391787 100644 (file)
@@ -3,7 +3,6 @@
 #define __PERF_CPUTOPO_H
 
 #include <linux/types.h>
-#include "env.h"
 
 struct cpu_topology {
        u32       core_sib;
index 14fb9e72aeeb4c14e9a14e43985a0e2439b4015a..797d86a1ab0957406268cb53e34cfd231e00486d 100644 (file)
@@ -1,8 +1,10 @@
 #include <errno.h>
 #include <inttypes.h>
 #include <linux/bitmap.h>
+#include <linux/kernel.h>
 #include <linux/zalloc.h>
 #include "debug.h"
+#include "env.h"
 #include "mem2node.h"
 
 struct phys_entry {
index 59c4752a2181530f0a571c806199fc68e0e9d809..8dfa2b58d0cd06beb67b811343469548814f2187 100644 (file)
@@ -2,8 +2,9 @@
 #define __MEM2NODE_H
 
 #include <linux/rbtree.h>
-#include "env.h"
+#include <linux/types.h>
 
+struct perf_env;
 struct phys_entry;
 
 struct mem2node {