diff mbox series

selftests: bpf: Remove dumplicated include in cgroup_helpers

Message ID 20211011111948.19301-1-wanjiabing@vivo.com (mailing list archive)
State Changes Requested
Delegated to: BPF
Headers show
Series selftests: bpf: Remove dumplicated include in cgroup_helpers | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch
bpf/vmtest-bpf-PR fail PR summary
bpf/vmtest-bpf-next-PR success PR summary
bpf/vmtest-bpf-next success VM_Test
bpf/vmtest-bpf fail VM_Test

Commit Message

Jiabing Wan Oct. 11, 2021, 11:19 a.m. UTC
Fix following checkincludes.pl warning:
./tools/testing/selftests/bpf/cgroup_helpers.c
12	#include <unistd.h>
    14	#include <unistd.h>

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
 tools/testing/selftests/bpf/cgroup_helpers.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Daniel Borkmann Oct. 11, 2021, 2:30 p.m. UTC | #1
On 10/11/21 1:19 PM, Wan Jiabing wrote:
> Fix following checkincludes.pl warning:
> ./tools/testing/selftests/bpf/cgroup_helpers.c
> 12	#include <unistd.h>
>      14	#include <unistd.h>

What does the 12 vs 14 mean here? Please provide a proper commit description, e.g. if
you used checkincludes.pl, maybe include the full command invocation and the relevant
output, so that this is more obvious and in a better shape. Thanks!

> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
> ---
>   tools/testing/selftests/bpf/cgroup_helpers.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/bpf/cgroup_helpers.c b/tools/testing/selftests/bpf/cgroup_helpers.c
> index 8fcd44841bb2..9d59c3990ca8 100644
> --- a/tools/testing/selftests/bpf/cgroup_helpers.c
> +++ b/tools/testing/selftests/bpf/cgroup_helpers.c
> @@ -11,7 +11,6 @@
>   #include <fcntl.h>
>   #include <unistd.h>
>   #include <ftw.h>
> -#include <unistd.h>
>   
>   #include "cgroup_helpers.h"
>   
>
Jiabing Wan Oct. 12, 2021, 2:20 a.m. UTC | #2
On 2021/10/11 22:30, Daniel Borkmann wrote:
> On 10/11/21 1:19 PM, Wan Jiabing wrote:
>> Fix following checkincludes.pl warning:
>> ./tools/testing/selftests/bpf/cgroup_helpers.c
>> 12    #include <unistd.h>
>>      14    #include <unistd.h>
>
> What does the 12 vs 14 mean here? Please provide a proper commit 
> description, e.g. if
> you used checkincludes.pl, maybe include the full command invocation 
> and the relevant
> output, so that this is more obvious and in a better shape. Thanks!

Sorry for my fuzzy description. 12 and 14 mean the line of includes file.
The script checkincludes.pl can only show which file is included 
duplicated, like

./scripts/checkincludes.pl tools/testing/selftests/bpf/cgroup_helpers.c
tools/testing/selftests/bpf/cgroup_helpers.c: unistd.h is included more 
than once.

So I upgrade the script so it can tell me the position of the duplicated 
includes.

I'll fix the description in v2.

>> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
>> ---
>>   tools/testing/selftests/bpf/cgroup_helpers.c | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/bpf/cgroup_helpers.c 
>> b/tools/testing/selftests/bpf/cgroup_helpers.c
>> index 8fcd44841bb2..9d59c3990ca8 100644
>> --- a/tools/testing/selftests/bpf/cgroup_helpers.c
>> +++ b/tools/testing/selftests/bpf/cgroup_helpers.c
>> @@ -11,7 +11,6 @@
>>   #include <fcntl.h>
>>   #include <unistd.h>
>>   #include <ftw.h>
>> -#include <unistd.h>
>>     #include "cgroup_helpers.h"
>>
>
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/cgroup_helpers.c b/tools/testing/selftests/bpf/cgroup_helpers.c
index 8fcd44841bb2..9d59c3990ca8 100644
--- a/tools/testing/selftests/bpf/cgroup_helpers.c
+++ b/tools/testing/selftests/bpf/cgroup_helpers.c
@@ -11,7 +11,6 @@ 
 #include <fcntl.h>
 #include <unistd.h>
 #include <ftw.h>
-#include <unistd.h>
 
 #include "cgroup_helpers.h"