2021-03-23 05:03:44

by Jiabing Wan

[permalink] [raw]
Subject: [PATCH] tools: perf: Remove duplicate includes

sys/stat.h has been included at line 23, so remove the
duplicate one at line 27.
linux/string.h has been included at line 7, so remove the
duplicate one at line 9.
time.h has been included at line 14, so remove the
duplicate one at line 28.

Signed-off-by: Wan Jiabing <[email protected]>
---
tools/perf/builtin-daemon.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c
index ace8772a4f03..632ecd010a4f 100644
--- a/tools/perf/builtin-daemon.c
+++ b/tools/perf/builtin-daemon.c
@@ -6,7 +6,6 @@
#include <linux/zalloc.h>
#include <linux/string.h>
#include <linux/limits.h>
-#include <linux/string.h>
#include <string.h>
#include <sys/file.h>
#include <signal.h>
@@ -24,8 +23,6 @@
#include <sys/signalfd.h>
#include <sys/wait.h>
#include <poll.h>
-#include <sys/stat.h>
-#include <time.h>
#include "builtin.h"
#include "perf.h"
#include "debug.h"
--
2.25.1


2021-03-25 13:00:59

by Arnaldo Carvalho de Melo

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

Em Tue, Mar 23, 2021 at 01:01:39PM +0800, Wan Jiabing escreveu:
> sys/stat.h has been included at line 23, so remove the
> duplicate one at line 27.
> linux/string.h has been included at line 7, so remove the
> duplicate one at line 9.
> time.h has been included at line 14, so remove the
> duplicate one at line 28.

Thanks, applied.

- Arnaldo


> Signed-off-by: Wan Jiabing <[email protected]>
> ---
> tools/perf/builtin-daemon.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c
> index ace8772a4f03..632ecd010a4f 100644
> --- a/tools/perf/builtin-daemon.c
> +++ b/tools/perf/builtin-daemon.c
> @@ -6,7 +6,6 @@
> #include <linux/zalloc.h>
> #include <linux/string.h>
> #include <linux/limits.h>
> -#include <linux/string.h>
> #include <string.h>
> #include <sys/file.h>
> #include <signal.h>
> @@ -24,8 +23,6 @@
> #include <sys/signalfd.h>
> #include <sys/wait.h>
> #include <poll.h>
> -#include <sys/stat.h>
> -#include <time.h>
> #include "builtin.h"
> #include "perf.h"
> #include "debug.h"
> --
> 2.25.1
>

--

- Arnaldo