net: xsk: Don't include <linux/rculist.h>

Message ID 88d6a1d88764cca328610854f890a9ca1f4b029e.1670086246.git.christophe.jaillet@wanadoo.fr
State New
Headers
Series net: xsk: Don't include <linux/rculist.h> |

Commit Message

Christophe JAILLET Dec. 3, 2022, 4:51 p.m. UTC
  There is no need to include <linux/rculist.h> here.

Prefer the less invasive <linux/types.h> which is needed for 'hlist_head'.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Let see if build-bots agree with me!

Just declaring 'struct mutex' and 'struct hlist_head' would also be an
option.
It would remove the need of any include, but is more likely to break
something.
---
 include/net/netns/xdp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

John Fastabend Dec. 6, 2022, 10:49 p.m. UTC | #1
Christophe JAILLET wrote:
> There is no need to include <linux/rculist.h> here.
> 
> Prefer the less invasive <linux/types.h> which is needed for 'hlist_head'.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Let see if build-bots agree with me!
> 
> Just declaring 'struct mutex' and 'struct hlist_head' would also be an
> option.
> It would remove the need of any include, but is more likely to break
> something.
> ---
>  include/net/netns/xdp.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/net/netns/xdp.h b/include/net/netns/xdp.h
> index e5734261ba0a..21a4f25a187a 100644
> --- a/include/net/netns/xdp.h
> +++ b/include/net/netns/xdp.h
> @@ -2,8 +2,8 @@
>  #ifndef __NETNS_XDP_H__
>  #define __NETNS_XDP_H__
>  
> -#include <linux/rculist.h>
>  #include <linux/mutex.h>
> +#include <linux/types.h>
>  
>  struct netns_xdp {
>  	struct mutex		lock;
> -- 
> 2.34.1
> 

Acked-by: John Fastabend <john.fastabend@gmail.com>
  
patchwork-bot+netdevbpf@kernel.org Dec. 7, 2022, 4:10 a.m. UTC | #2
Hello:

This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Sat,  3 Dec 2022 17:51:04 +0100 you wrote:
> There is no need to include <linux/rculist.h> here.
> 
> Prefer the less invasive <linux/types.h> which is needed for 'hlist_head'.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Let see if build-bots agree with me!
> 
> [...]

Here is the summary with links:
  - net: xsk: Don't include <linux/rculist.h>
    https://git.kernel.org/bpf/bpf-next/c/e9b4aeed5669

You are awesome, thank you!
  

Patch

diff --git a/include/net/netns/xdp.h b/include/net/netns/xdp.h
index e5734261ba0a..21a4f25a187a 100644
--- a/include/net/netns/xdp.h
+++ b/include/net/netns/xdp.h
@@ -2,8 +2,8 @@ 
 #ifndef __NETNS_XDP_H__
 #define __NETNS_XDP_H__
 
-#include <linux/rculist.h>
 #include <linux/mutex.h>
+#include <linux/types.h>
 
 struct netns_xdp {
 	struct mutex		lock;