2019-01-15 16:39:30

by Brajeswar Ghosh

[permalink] [raw]
Subject: [PATCH] tools/perf: Remove duplicate header

Remove duplicate headers which are included more than once

Signed-off-by: Brajeswar Ghosh <[email protected]>
---
tools/perf/builtin-stat.c | 1 -
tools/perf/tests/bp_account.c | 1 -
tools/perf/util/dso.h | 1 -
tools/perf/util/zlib.c | 1 -
4 files changed, 4 deletions(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index d1028d7755bb..f919ffc4b3b3 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -83,7 +83,6 @@
#include <unistd.h>
#include <sys/time.h>
#include <sys/resource.h>
-#include <sys/wait.h>

#include "sane_ctype.h"

diff --git a/tools/perf/tests/bp_account.c b/tools/perf/tests/bp_account.c
index a20cbc445426..57fc544aedb0 100644
--- a/tools/perf/tests/bp_account.c
+++ b/tools/perf/tests/bp_account.c
@@ -15,7 +15,6 @@
#include <sys/mman.h>
#include <linux/compiler.h>
#include <linux/hw_breakpoint.h>
-#include <sys/ioctl.h>

#include "tests.h"
#include "debug.h"
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index c5380500bed4..722d67a407e2 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -8,7 +8,6 @@
#include <sys/types.h>
#include <stdbool.h>
#include "rwsem.h"
-#include <linux/types.h>
#include <linux/bitops.h>
#include "map.h"
#include "namespaces.h"
diff --git a/tools/perf/util/zlib.c b/tools/perf/util/zlib.c
index 902ce6384f57..512ad7c09b13 100644
--- a/tools/perf/util/zlib.c
+++ b/tools/perf/util/zlib.c
@@ -6,7 +6,6 @@
#include <sys/mman.h>
#include <zlib.h>
#include <linux/compiler.h>
-#include <unistd.h>

#include "util/compress.h"
#include "util/util.h"
--
2.17.1



2019-01-17 09:08:34

by Souptick Joarder

[permalink] [raw]
Subject: Re: [PATCH] tools/perf: Remove duplicate header

On Tue, Jan 15, 2019 at 7:29 PM Brajeswar Ghosh
<[email protected]> wrote:
>
> Remove duplicate headers which are included more than once
>
> Signed-off-by: Brajeswar Ghosh <[email protected]>

Acked-by: Souptick Joarder <[email protected]>

> ---
> tools/perf/builtin-stat.c | 1 -
> tools/perf/tests/bp_account.c | 1 -
> tools/perf/util/dso.h | 1 -
> tools/perf/util/zlib.c | 1 -
> 4 files changed, 4 deletions(-)
>
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index d1028d7755bb..f919ffc4b3b3 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -83,7 +83,6 @@
> #include <unistd.h>
> #include <sys/time.h>
> #include <sys/resource.h>
> -#include <sys/wait.h>
>
> #include "sane_ctype.h"
>
> diff --git a/tools/perf/tests/bp_account.c b/tools/perf/tests/bp_account.c
> index a20cbc445426..57fc544aedb0 100644
> --- a/tools/perf/tests/bp_account.c
> +++ b/tools/perf/tests/bp_account.c
> @@ -15,7 +15,6 @@
> #include <sys/mman.h>
> #include <linux/compiler.h>
> #include <linux/hw_breakpoint.h>
> -#include <sys/ioctl.h>
>
> #include "tests.h"
> #include "debug.h"
> diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
> index c5380500bed4..722d67a407e2 100644
> --- a/tools/perf/util/dso.h
> +++ b/tools/perf/util/dso.h
> @@ -8,7 +8,6 @@
> #include <sys/types.h>
> #include <stdbool.h>
> #include "rwsem.h"
> -#include <linux/types.h>
> #include <linux/bitops.h>
> #include "map.h"
> #include "namespaces.h"
> diff --git a/tools/perf/util/zlib.c b/tools/perf/util/zlib.c
> index 902ce6384f57..512ad7c09b13 100644
> --- a/tools/perf/util/zlib.c
> +++ b/tools/perf/util/zlib.c
> @@ -6,7 +6,6 @@
> #include <sys/mman.h>
> #include <zlib.h>
> #include <linux/compiler.h>
> -#include <unistd.h>
>
> #include "util/compress.h"
> #include "util/util.h"
> --
> 2.17.1
>

2019-01-17 13:37:16

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: [PATCH] tools/perf: Remove duplicate header

Em Thu, Jan 17, 2019 at 11:25:52AM +0530, Souptick Joarder escreveu:
> On Tue, Jan 15, 2019 at 7:29 PM Brajeswar Ghosh
> <[email protected]> wrote:
> >
> > Remove duplicate headers which are included more than once
> >
> > Signed-off-by: Brajeswar Ghosh <[email protected]>
>
> Acked-by: Souptick Joarder <[email protected]>

Thanks, applied.

- Arnaldo

Subject: [tip:perf/core] perf tools: Remove duplicate headers

Commit-ID: 3eb03a5208a4eb46443e23e3fa9eb7e4c7ae4885
Gitweb: https://git.kernel.org/tip/3eb03a5208a4eb46443e23e3fa9eb7e4c7ae4885
Author: Brajeswar Ghosh <[email protected]>
AuthorDate: Tue, 15 Jan 2019 19:29:16 +0530
Committer: Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 21 Jan 2019 15:15:57 -0300

perf tools: Remove duplicate headers

Remove duplicate headers which are included more than once in the same
file.

Signed-off-by: Brajeswar Ghosh <[email protected]>
Acked-by: Souptick Joarder <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Colin King <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Sabyasachi Gupta <[email protected]>
Link: http://lkml.kernel.org/r/20190115135916.GA3629@hp-pavilion-15-notebook-pc-brajeswar
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
---
tools/perf/builtin-stat.c | 1 -
tools/perf/tests/bp_account.c | 1 -
tools/perf/util/dso.h | 1 -
tools/perf/util/zlib.c | 1 -
4 files changed, 4 deletions(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 63a3afc7f32b..e587808591e8 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -83,7 +83,6 @@
#include <unistd.h>
#include <sys/time.h>
#include <sys/resource.h>
-#include <sys/wait.h>

#include "sane_ctype.h"

diff --git a/tools/perf/tests/bp_account.c b/tools/perf/tests/bp_account.c
index a20cbc445426..57fc544aedb0 100644
--- a/tools/perf/tests/bp_account.c
+++ b/tools/perf/tests/bp_account.c
@@ -15,7 +15,6 @@
#include <sys/mman.h>
#include <linux/compiler.h>
#include <linux/hw_breakpoint.h>
-#include <sys/ioctl.h>

#include "tests.h"
#include "debug.h"
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index 8c8a7abe809d..af2eda29660f 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -8,7 +8,6 @@
#include <sys/types.h>
#include <stdbool.h>
#include "rwsem.h"
-#include <linux/types.h>
#include <linux/bitops.h>
#include "map.h"
#include "namespaces.h"
diff --git a/tools/perf/util/zlib.c b/tools/perf/util/zlib.c
index 902ce6384f57..512ad7c09b13 100644
--- a/tools/perf/util/zlib.c
+++ b/tools/perf/util/zlib.c
@@ -6,7 +6,6 @@
#include <sys/mman.h>
#include <zlib.h>
#include <linux/compiler.h>
-#include <unistd.h>

#include "util/compress.h"
#include "util/util.h"