Commit 68a600de authored by Sven Eckelmann's avatar Sven Eckelmann Committed by Simon Wunderlich
Browse files

batman-adv: Use includes instead of fwdecls



While it can be slightly beneficial for the build performance to use
forward declarations instead of includes, the handling of them together
with changes in the included headers makes it unnecessary complicated and
fragile. Just replace them with actual includes since some parts (hwmon,
..) of the kernel even request avoidance of forward declarations and net/
is mostly not using them in *.c file.

Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
parent 47d4522d
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -9,12 +9,11 @@

#include "main.h"

#include <linux/netlink.h>
#include <linux/seq_file.h>
#include <linux/skbuff.h>
#include <linux/types.h>

struct netlink_callback;
struct seq_file;
struct sk_buff;

extern char batadv_routing_algo[];
extern struct list_head batadv_hardif_list;

+1 −2
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <linux/rculist.h>
#include <linux/rcupdate.h>
#include <linux/seq_file.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <linux/stddef.h>
#include <linux/types.h>
@@ -41,8 +42,6 @@
#include "netlink.h"
#include "originator.h"

struct sk_buff;

static void batadv_v_iface_activate(struct batadv_hard_iface *hard_iface)
{
	struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
+2 −2
Original line number Diff line number Diff line
@@ -9,8 +9,8 @@

#include "main.h"

struct sk_buff;
struct work_struct;
#include <linux/skbuff.h>
#include <linux/workqueue.h>

int batadv_v_elp_iface_enable(struct batadv_hard_iface *hard_iface);
void batadv_v_elp_iface_disable(struct batadv_hard_iface *hard_iface);
+1 −2
Original line number Diff line number Diff line
@@ -9,10 +9,9 @@

#include "main.h"

#include <linux/skbuff.h>
#include <linux/types.h>

struct sk_buff;

int batadv_v_ogm_init(struct batadv_priv *bat_priv);
void batadv_v_ogm_free(struct batadv_priv *bat_priv);
int batadv_v_ogm_iface_enable(struct batadv_hard_iface *hard_iface);
+4 −5
Original line number Diff line number Diff line
@@ -10,14 +10,13 @@
#include "main.h"

#include <linux/compiler.h>
#include <linux/netdevice.h>
#include <linux/netlink.h>
#include <linux/seq_file.h>
#include <linux/skbuff.h>
#include <linux/stddef.h>
#include <linux/types.h>

struct net_device;
struct netlink_callback;
struct seq_file;
struct sk_buff;

/**
 * batadv_bla_is_loopdetect_mac() - check if the mac address is from a loop
 *  detect frame sent by bridge loop avoidance
Loading