From patchwork Tue Apr 17 10:24:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1711 Return-Path: Received: from confino.investici.org (investici.nine.ch [217.150.252.179]) by open-mesh.org (Postfix) with ESMTPS id 8AD5B6007FE for ; Tue, 17 Apr 2012 12:24:02 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@autistici.org; dkim-adsp=pass Received: from [217.150.252.179] (confino [217.150.252.179]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id 3DB2BC86BE; Tue, 17 Apr 2012 10:24:01 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 confino.investici.org 3DB2BC86BE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1334658241; bh=EzTzp8yKVyXbpcsyf3/iKPOZPDVIPBSUkSdi3TMWKJY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=PAPJ8T4v5+v/AKxA9EBJvE/naZJmwq0OojfO2aQgLhcjHOGFO1RF6MKtg1wu1o1dI PBYAVm0J7TXnhrxZucw2VPzArgHg8ywESWLMhGfhZLyqUZ65fJY4djL0PlpoQ5wxXG uhtHmSC+q8Pg/qsAiktvsOeuoGcIzkhmIjgd4blI= From: Antonio Quartulli To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 17 Apr 2012 12:24:54 +0200 Message-Id: <1334658294-2413-3-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.9.4 In-Reply-To: <1334658294-2413-1-git-send-email-ordex@autistici.org> References: <1334658294-2413-1-git-send-email-ordex@autistici.org> Subject: [B.A.T.M.A.N.] [PATCH 3/3] batman-adv: use static inline functions instead of bla(...) X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Apr 2012 10:24:02 -0000 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 --- distributed-arp-table.h | 51 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/distributed-arp-table.h b/distributed-arp-table.h index 0e93c75..d87f26c 100644 --- a/distributed-arp-table.h +++ b/distributed-arp-table.h @@ -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 */