Skip to contentSkip to conversation

batman-adv: Remove duplicate types.h inclusions

PATCH Applied Linus Lüssing 3 participants 5 messages Feb 4, 2011 – Feb 6, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 batman-adv: Remove duplicate types.h inclusions

types.h is included by main.h, which is included at the beginning of any other c-file anyway. Therefore this commit removes those duplicate inclussions.

---
 icmp_socket.c       |    1 -
 icmp_socket.h       |    2 --
 main.c              |    1 -
 routing.c           |    1 -
 routing.h           |    2 --
 send.c              |    1 -
 send.h              |    2 --
 soft-interface.c    |    1 -
 translation-table.c |    1 -
 translation-table.h |    2 --
 10 files changed, 0 insertions(+), 14 deletions(-)
batman-adv/icmp_socket.c +0 -1
index 10a969c..fc812e1 100644
@@ -24,7 +24,6 @@
 #include <linux/slab.h>
 #include "icmp_socket.h"
 #include "send.h"
-#include "types.h"
 #include "hash.h"
 #include "originator.h"
 #include "hard-interface.h"
batman-adv/icmp_socket.h +0 -2
index 08b1859..462b190 100644
@@ -22,8 +22,6 @@
 #ifndef _NET_BATMAN_ADV_ICMP_SOCKET_H_
 #define _NET_BATMAN_ADV_ICMP_SOCKET_H_
 
-#include "types.h"
-
 #define ICMP_SOCKET "socket"
 
 void bat_socket_init(void);
batman-adv/main.c +0 -1
index e687e7f..658ad5a 100644
@@ -30,7 +30,6 @@
 #include "translation-table.h"
 #include "hard-interface.h"
 #include "gateway_client.h"
-#include "types.h"
 #include "vis.h"
 #include "hash.h"
 
batman-adv/routing.c +0 -1
index 2861f18..b792df4 100644
@@ -28,7 +28,6 @@
 #include "icmp_socket.h"
 #include "translation-table.h"
 #include "originator.h"
-#include "types.h"
 #include "ring_buffer.h"
 #include "vis.h"
 #include "aggregation.h"
batman-adv/routing.h +0 -2
index 8b76424..e2a9872 100644
@@ -22,8 +22,6 @@
 #ifndef _NET_BATMAN_ADV_ROUTING_H_
 #define _NET_BATMAN_ADV_ROUTING_H_
 
-#include "types.h"
-
 void slide_own_bcast_window(struct batman_if *batman_if);
 void receive_bat_packet(struct ethhdr *ethhdr,
 				struct batman_packet *batman_packet,
batman-adv/send.c +0 -1
index 7cc620e..8314276 100644
@@ -25,7 +25,6 @@
 #include "translation-table.h"
 #include "soft-interface.h"
 #include "hard-interface.h"
-#include "types.h"
 #include "vis.h"
 #include "aggregation.h"
 #include "gateway_common.h"
batman-adv/send.h +0 -2
index bc53ade..b68c272 100644
@@ -22,8 +22,6 @@
 #ifndef _NET_BATMAN_ADV_SEND_H_
 #define _NET_BATMAN_ADV_SEND_H_
 
-#include "types.h"
-
 int send_skb_packet(struct sk_buff *skb,
 				struct batman_if *batman_if,
 				uint8_t *dst_addr);
batman-adv/soft-interface.c +0 -1
index 145e0f7..bd088f8 100644
@@ -26,7 +26,6 @@
 #include "send.h"
 #include "bat_debugfs.h"
 #include "translation-table.h"
-#include "types.h"
 #include "hash.h"
 #include "gateway_common.h"
 #include "gateway_client.h"
batman-adv/translation-table.c +0 -1
index a998c25..28a212a 100644
@@ -22,7 +22,6 @@
 #include "main.h"
 #include "translation-table.h"
 #include "soft-interface.h"
-#include "types.h"
 #include "hash.h"
 #include "originator.h"
 
batman-adv/translation-table.h +0 -2
index a4f3a37..f19931c 100644
@@ -22,8 +22,6 @@
 #ifndef _NET_BATMAN_ADV_TRANSLATION_TABLE_H_
 #define _NET_BATMAN_ADV_TRANSLATION_TABLE_H_
 
-#include "types.h"
-
 int hna_local_init(struct bat_priv *bat_priv);
 void hna_local_add(struct net_device *soft_iface, uint8_t *addr);
 void hna_local_remove(struct bat_priv *bat_priv,
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 2/2 batman-adv: Switch order of types.h and compat.h inclusion

The compat.h changes should be transparent for any other of our source files - even for types.h. Therefore switching the order.

---
 main.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
batman-adv/main.h +2 -2
index 1ec9986..bd8470d 100644
@@ -114,10 +114,10 @@
 #include <net/sock.h>		/* struct sock */
 #include <linux/jiffies.h>
 #include <linux/seq_file.h>
-#include "types.h"
-
 #include "compat.h"
 
+#include "types.h"
+
 #ifndef REVISION_VERSION
 #define REVISION_VERSION_STR ""
 #else
Signature · 1 line
1.7.2.3
#4 lore raw
In reply to Linus Lüssing
Quoted 3 lines · On Friday 04 February 2011 14:57:12 Linus Lüssing wrote:

types.h is included by main.h, which is included at the beginning of any other c-file anyway. Therefore this commit removes those duplicate inclussions.

Applied in revision 1931.

Thanks,
Marek

#2 lore raw

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Switch order of types.h and compat.h inclusion

In reply to Linus Lüssing
Quoted 2 lines · On Friday 04 February 2011 14:57:13 Linus Lüssing wrote:

The compat.h changes should be transparent for any other of our source files - even for types.h. Therefore switching the order.

Applied in revision 1932.

Thanks,
Marek