[3/3] batman-adv: use static inline functions instead of bla(...)
Commit Message
When the DAT component is not built, instead of having fake function like
foo(...) we must use a static inline function in order to allow the compiler to
check the number of the type of the passed arguments
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
distributed-arp-table.h | 51 ++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 44 insertions(+), 7 deletions(-)
@@ -88,13 +88,50 @@ static inline void dat_init_own_dht_addr(struct bat_priv *bat_priv,
#else
-#define dat_snoop_outgoing_arp_request(...) (0)
-#define dat_snoop_incoming_arp_request(...) (0)
-#define dat_snoop_outgoing_arp_reply(...)
-#define dat_snoop_incoming_arp_reply(...) (0)
-#define dat_drop_broadcast_packet(...) (0)
-#define dat_init_orig_node_dht_addr(...)
-#define dat_init_own_dht_addr(...)
+static inline void dat_sysfs_change(struct net_device *soft_iface)
+{
+}
+
+static inline bool dat_snoop_outgoing_arp_request(struct bat_priv *bat_priv,
+ struct sk_buff *skb)
+{
+ return false;
+}
+
+static inline bool dat_snoop_incoming_arp_request(struct bat_priv *bat_priv,
+ struct sk_buff *skb,
+ int hdr_size)
+{
+ return false;
+}
+
+static inline bool dat_snoop_outgoing_arp_reply(struct bat_priv *bat_priv,
+ struct sk_buff *skb)
+{
+ return false;
+}
+
+static inline bool dat_snoop_incoming_arp_reply(struct bat_priv *bat_priv,
+ struct sk_buff *skb,
+ int hdr_size)
+{
+ return false;
+}
+
+static inline bool dat_drop_broadcast_packet(struct bat_priv *bat_priv,
+ struct forw_packet *forw_packet)
+{
+ return false;
+}
+
+static inline void dat_init_orig_node_dht_addr(struct orig_node *orig_node)
+{
+}
+
+static inline void dat_init_own_dht_addr(struct bat_priv *bat_priv,
+ struct hard_iface *primary_if)
+{
+}
#endif /* CONFIG_BATMAN_ADV_DAT */