Skip to contentSkip to conversation

batman-adv: Remove batadv_ types forward declarations

PATCH Applied Sven Eckelmann 2 participants 12 messages Jun 18, 2015 – Jun 19, 2015 Batman advanced

lore
Share & tools
lore

Sven Eckelmann

author maintainer
#0 lore raw

PATCH 1/6 batman-adv: Remove batadv_ types forward declarations

main.h is included in every file and is the only way to access types.h. This makes forward declarations for all types defined in types.h unnecessary.

---
 net/batman-adv/bridge_loop_avoidance.h | 3 ---
 net/batman-adv/debugfs.h               | 1 -
 net/batman-adv/gateway_common.h        | 1 -
 net/batman-adv/icmp_socket.h           | 1 -
 net/batman-adv/multicast.h             | 2 --
 net/batman-adv/network-coding.h        | 4 ----
 net/batman-adv/routing.h               | 4 ----
 net/batman-adv/send.h                  | 3 ---
 net/batman-adv/soft-interface.h        | 4 ----
 net/batman-adv/sysfs.h                 | 2 --
 net/batman-adv/translation-table.h     | 2 --
 11 files changed, 27 deletions(-)
net/batman-adv/bridge_loop_avoidance.h +0 -3
index 449f2f1..025152b 100644
@@ -22,9 +22,6 @@
 
 #include <linux/types.h>
 
-struct batadv_hard_iface;
-struct batadv_orig_node;
-struct batadv_priv;
 struct seq_file;
 struct sk_buff;
 
net/batman-adv/debugfs.h +0 -1
index 187acdc..80ab8d6 100644
@@ -22,7 +22,6 @@
 
 #include <linux/kconfig.h>
 
-struct batadv_hard_iface;
 struct net_device;
 
 #define BATADV_DEBUGFS_SUBDIR "batman_adv"
net/batman-adv/gateway_common.h +0 -1
index bd5c812..ab893e3 100644
@@ -22,7 +22,6 @@
 
 #include <linux/types.h>
 
-struct batadv_priv;
 struct net_device;
 
 enum batadv_gw_modes {
net/batman-adv/icmp_socket.h +0 -1
index 7de7fce..e937143 100644
@@ -23,7 +23,6 @@
 #include <linux/types.h>
 
 struct batadv_icmp_header;
-struct batadv_priv;
 
 #define BATADV_ICMP_SOCKET "socket"
 
net/batman-adv/multicast.h +0 -2
index beb6e56..8f3cb04 100644
@@ -20,8 +20,6 @@
 
 #include "main.h"
 
-struct batadv_orig_node;
-struct batadv_priv;
 struct sk_buff;
 
 /**
net/batman-adv/network-coding.h +0 -4
index 5b79aa8..8f6d4ad 100644
@@ -22,11 +22,7 @@
 
 #include <linux/types.h>
 
-struct batadv_nc_node;
-struct batadv_neigh_node;
 struct batadv_ogm_packet;
-struct batadv_orig_node;
-struct batadv_priv;
 struct net_device;
 struct seq_file;
 struct sk_buff;
net/batman-adv/routing.h +0 -4
index 3c185a1..204bbe4 100644
@@ -22,10 +22,6 @@
 
 #include <linux/types.h>
 
-struct batadv_hard_iface;
-struct batadv_neigh_node;
-struct batadv_orig_node;
-struct batadv_priv;
 struct sk_buff;
 
 bool batadv_check_management_packet(struct sk_buff *skb,
net/batman-adv/send.h +0 -3
index 33ef6fc..82059f2 100644
@@ -25,9 +25,6 @@
 
 #include "packet.h"
 
-struct batadv_hard_iface;
-struct batadv_orig_node;
-struct batadv_priv;
 struct sk_buff;
 struct work_struct;
 
net/batman-adv/soft-interface.h +0 -4
index 578e8a6..8e82176 100644
@@ -22,10 +22,6 @@
 
 #include <net/rtnetlink.h>
 
-struct batadv_hard_iface;
-struct batadv_orig_node;
-struct batadv_priv;
-struct batadv_softif_vlan;
 struct net_device;
 struct sk_buff;
 
net/batman-adv/sysfs.h +0 -2
index 2294583..6197442 100644
@@ -23,8 +23,6 @@
 #include <linux/sysfs.h>
 #include <linux/types.h>
 
-struct batadv_priv;
-struct batadv_softif_vlan;
 struct kobject;
 struct net_device;
 
net/batman-adv/translation-table.h +0 -2
index 9b82d5d..abd8e11 100644
@@ -22,8 +22,6 @@
 
 #include <linux/types.h>
 
-struct batadv_orig_node;
-struct batadv_priv;
 struct net_device;
 struct seq_file;
 
Signature · 1 line
2.1.4
author maintainer
#1 lore raw

PATCH 2/6 batman-adv: Add missing include for clear_/set_bit in DAT

bfd0fbaef270 ("batman-adv: Make DAT capability changes atomic") started to use clear_bit and set_bit but did not add the include for these functions.

---
 net/batman-adv/distributed-arp-table.c | 1 +
 1 file changed, 1 insertion(+)
net/batman-adv/distributed-arp-table.c +1 -0
index dc1191a..4ba7f61 100644
@@ -19,6 +19,7 @@
 #include "main.h"
 
 #include <linux/atomic.h>
+#include <linux/bitops.h>
 #include <linux/byteorder/generic.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
Signature · 1 line
2.1.4
author maintainer
#3 lore raw

PATCH 3/6 batman-adv: Add missing include for clear_/set_bit in MCAST

In reply to Sven Eckelmann

201a54ba710a ("batman-adv: Make MCAST capability changes atomic") started to use clear_bit and set_bit but did not add the include for these functions.

---
 net/batman-adv/multicast.c | 1 +
 1 file changed, 1 insertion(+)
net/batman-adv/multicast.c +1 -0
index 2fa9983..b8002a5 100644
@@ -19,6 +19,7 @@
 #include "main.h"
 
 #include <linux/atomic.h>
+#include <linux/bitops.h>
 #include <linux/byteorder/generic.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
Signature · 1 line
2.1.4
author maintainer
#5 lore raw

PATCH 4/6 batman-adv: Add missing include for BUG_ON in MCAST

In reply to Sven Eckelmann

7f220ed1f063 ("batman-adv: Fix potential synchronization issues in mcast tvlv handler") started to use BUG_ON but did not add the include for these functions.

---
 net/batman-adv/multicast.c | 1 +
 1 file changed, 1 insertion(+)
net/batman-adv/multicast.c +1 -0
index b8002a5..c64d9b1 100644
@@ -20,6 +20,7 @@
 
 #include <linux/atomic.h>
 #include <linux/bitops.h>
+#include <linux/bug.h>
 #include <linux/byteorder/generic.h>
 #include <linux/errno.h>
 #include <linux/etherdevice.h>
Signature · 1 line
2.1.4
author maintainer
#7 lore raw

PATCH 5/6 batman-adv: Add missing include for clear_/set_bit in NC

In reply to Sven Eckelmann

586df9e2537b ("batman-adv: Make NC capability changes atomic") started to use clear_bit and set_bit but did not add the include for these functions.

---
 net/batman-adv/network-coding.c | 1 +
 1 file changed, 1 insertion(+)
net/batman-adv/network-coding.c +1 -0
index 9d8d6a9..62defe0 100644
@@ -19,6 +19,7 @@
 #include "main.h"
 
 #include <linux/atomic.h>
+#include <linux/bitops.h>
 #include <linux/byteorder/generic.h>
 #include <linux/compiler.h>
 #include <linux/debugfs.h>
Signature · 1 line
2.1.4
author maintainer
#9 lore raw

PATCH 6/6 batman-adv: Add missing include for clear_/set_bit in TT

In reply to Sven Eckelmann

a51fa16ecf3f ("batman-adv: Make TT capability changes atomic") started to use use clear_bit and set_bit but did not add the include for these functions.

---
 net/batman-adv/translation-table.c | 1 +
 1 file changed, 1 insertion(+)
net/batman-adv/translation-table.c +1 -0
index 3aca026..ed3ede3 100644
@@ -19,6 +19,7 @@
 #include "main.h"
 
 #include <linux/atomic.h>
+#include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/byteorder/generic.h>
 #include <linux/compiler.h>
Signature · 1 line
2.1.4
#11 lore raw
In reply to Sven Eckelmann
Quoted 5 lines · On Thursday, June 18, 2015 18:53:19 Sven Eckelmann wrote:

main.h is included in every file and is the only way to access types.h. This makes forward declarations for all types defined in types.h unnecessary.

Quoted 13 lines
---
 net/batman-adv/bridge_loop_avoidance.h | 3 ---
 net/batman-adv/debugfs.h               | 1 -
 net/batman-adv/gateway_common.h        | 1 -
 net/batman-adv/icmp_socket.h           | 1 -
 net/batman-adv/multicast.h             | 2 --
 net/batman-adv/network-coding.h        | 4 ----
 net/batman-adv/routing.h               | 4 ----
 net/batman-adv/send.h                  | 3 ---
 net/batman-adv/soft-interface.h        | 4 ----
 net/batman-adv/sysfs.h                 | 2 --
 net/batman-adv/translation-table.h     | 2 --
 11 files changed, 27 deletions(-)

Applied in revision 31b0151.

Thanks,
Marek

#2 lore raw

Re: [B.A.T.M.A.N.] [PATCH 2/6] batman-adv: Add missing include for clear_/set_bit in DAT

In reply to Sven Eckelmann
Quoted 7 lines · On Thursday, June 18, 2015 18:53:20 Sven Eckelmann wrote:

bfd0fbaef270 ("batman-adv: Make DAT capability changes atomic") started to use clear_bit and set_bit but did not add the include for these functions.

---
 net/batman-adv/distributed-arp-table.c | 1 +
 1 file changed, 1 insertion(+)

Applied in revision 746aecd.

Thanks,
Marek

#4 lore raw

Re: [B.A.T.M.A.N.] [PATCH 3/6] batman-adv: Add missing include for clear_/set_bit in MCAST

In reply to Sven Eckelmann
Quoted 8 lines · On Thursday, June 18, 2015 18:53:21 Sven Eckelmann wrote:

201a54ba710a ("batman-adv: Make MCAST capability changes atomic") started to use clear_bit and set_bit but did not add the include for these functions.

---
 net/batman-adv/multicast.c | 1 +
 1 file changed, 1 insertion(+)

Applied in revision 0128bee.

Thanks,
Marek

#6 lore raw

Re: [B.A.T.M.A.N.] [PATCH 4/6] batman-adv: Add missing include for BUG_ON in MCAST

In reply to Sven Eckelmann
Quoted 8 lines · On Thursday, June 18, 2015 18:53:22 Sven Eckelmann wrote:

7f220ed1f063 ("batman-adv: Fix potential synchronization issues in mcast tvlv handler") started to use BUG_ON but did not add the include for these functions.

---
 net/batman-adv/multicast.c | 1 +
 1 file changed, 1 insertion(+)

Applied in revision cfb1542.

Thanks,
Marek

#8 lore raw

Re: [B.A.T.M.A.N.] [PATCH 5/6] batman-adv: Add missing include for clear_/set_bit in NC

In reply to Sven Eckelmann
Quoted 7 lines · On Thursday, June 18, 2015 18:53:23 Sven Eckelmann wrote:

586df9e2537b ("batman-adv: Make NC capability changes atomic") started to use clear_bit and set_bit but did not add the include for these functions.

---
 net/batman-adv/network-coding.c | 1 +
 1 file changed, 1 insertion(+)

Applied in revision c0d0029.

Thanks,
Marek

#10 lore raw

Re: [B.A.T.M.A.N.] [PATCH 6/6] batman-adv: Add missing include for clear_/set_bit in TT

In reply to Sven Eckelmann
Quoted 8 lines · On Thursday, June 18, 2015 18:53:24 Sven Eckelmann wrote:

a51fa16ecf3f ("batman-adv: Make TT capability changes atomic") started to use use clear_bit and set_bit but did not add the include for these functions.

---
 net/batman-adv/translation-table.c | 1 +
 1 file changed, 1 insertion(+)

Applied in revision 5138e6a.

Thanks,
Marek