batman-adv: remove includes for extern declarations

It is not necessary to include the header for the struct definition for an
"extern " declaration. It can simply be dropped from the headers to reduce
the number of includes the preprocessor has to process. If needed, it can
be added to the actual C source file.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
This commit is contained in:
Sven Eckelmann
2025-08-28 20:21:43 +02:00
committed by Simon Wunderlich
parent d5d80ac74f
commit 629a2b18e8
5 changed files with 2 additions and 3 deletions

View File

@@ -22,6 +22,7 @@
#include <linux/minmax.h>
#include <linux/mutex.h>
#include <linux/netdevice.h>
#include <linux/notifier.h>
#include <linux/printk.h>
#include <linux/rculist.h>
#include <linux/rtnetlink.h>

View File

@@ -12,7 +12,6 @@
#include <linux/compiler.h>
#include <linux/kref.h>
#include <linux/netdevice.h>
#include <linux/notifier.h>
#include <linux/rcupdate.h>
#include <linux/stddef.h>
#include <linux/types.h>

View File

@@ -37,6 +37,7 @@
#include <linux/string.h>
#include <linux/types.h>
#include <net/netlink.h>
#include <net/rtnetlink.h>
#include <uapi/linux/batadv_packet.h>
#include <uapi/linux/batman_adv.h>

View File

@@ -13,7 +13,6 @@
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/types.h>
#include <net/rtnetlink.h>
int batadv_skb_head_push(struct sk_buff *skb, unsigned int len);
void batadv_interface_rx(struct net_device *mesh_iface,

View File

@@ -11,7 +11,6 @@
#include <linux/netlink.h>
#include <linux/types.h>
#include <net/genetlink.h>
void batadv_netlink_register(void);
void batadv_netlink_unregister(void);