2021-04-01 06:50:56

by Jiabing Wan

[permalink] [raw]
Subject: [PATCH] linux/bpf-cgroup.h: Delete repeated struct declaration

struct bpf_prog is declared twice. There is one declaration
which is independent on the MACRO at 18th line.
So the below one is not needed though. Remove the duplicate.

Signed-off-by: Wan Jiabing <[email protected]>
---
include/linux/bpf-cgroup.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h
index c42e02b4d84b..57b4d4b980e7 100644
--- a/include/linux/bpf-cgroup.h
+++ b/include/linux/bpf-cgroup.h
@@ -418,7 +418,6 @@ int cgroup_bpf_prog_query(const union bpf_attr *attr,
union bpf_attr __user *uattr);
#else

-struct bpf_prog;
struct cgroup_bpf {};
static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; }
static inline void cgroup_bpf_offline(struct cgroup *cgrp) {}
--
2.25.1


2021-04-01 06:55:12

by Song Liu

[permalink] [raw]
Subject: Re: [PATCH] linux/bpf-cgroup.h: Delete repeated struct declaration



> On Mar 31, 2021, at 11:46 PM, Wan Jiabing <[email protected]> wrote:
>
> struct bpf_prog is declared twice. There is one declaration
> which is independent on the MACRO at 18th line.
> So the below one is not needed though. Remove the duplicate.
>
> Signed-off-by: Wan Jiabing <[email protected]>

Acked-by: Song Liu <[email protected]>

> ---
> include/linux/bpf-cgroup.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h
> index c42e02b4d84b..57b4d4b980e7 100644
> --- a/include/linux/bpf-cgroup.h
> +++ b/include/linux/bpf-cgroup.h
> @@ -418,7 +418,6 @@ int cgroup_bpf_prog_query(const union bpf_attr *attr,
> union bpf_attr __user *uattr);
> #else
>
> -struct bpf_prog;
> struct cgroup_bpf {};
> static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; }
> static inline void cgroup_bpf_offline(struct cgroup *cgrp) {}
> --
> 2.25.1
>

2021-04-02 23:52:25

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH] linux/bpf-cgroup.h: Delete repeated struct declaration

Hello:

This patch was applied to bpf/bpf-next.git (refs/heads/master):

On Thu, 1 Apr 2021 14:46:37 +0800 you wrote:
> struct bpf_prog is declared twice. There is one declaration
> which is independent on the MACRO at 18th line.
> So the below one is not needed though. Remove the duplicate.
>
> Signed-off-by: Wan Jiabing <[email protected]>
> ---
> include/linux/bpf-cgroup.h | 1 -
> 1 file changed, 1 deletion(-)

Here is the summary with links:
- linux/bpf-cgroup.h: Delete repeated struct declaration
https://git.kernel.org/bpf/bpf-next/c/2daae89666ad

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html