From patchwork Sat Jul 7 20:01:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17417 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 2C90382B71; Sat, 7 Jul 2018 22:01:31 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.b="TKK8DtIx"; dkim-atps=neutral Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver= Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 9041682B5E for ; Sat, 7 Jul 2018 22:01:29 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593EBBFFD0000000000004065.dip0.t-ipconnect.de [IPv6:2003:c5:93eb:bffd::4065]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id BEC30110118; Sat, 7 Jul 2018 22:01:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1530993688; bh=0yL9PIu62XB5Iuf9lsLoXFC2ldWcbrDX7/hj6/LDGp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TKK8DtIxqINm7wwkKcdw1iodPw82a9Aa36hrdQfxWrKsNPTGfMElPKC0QVmZAcqF0 uBU3Pm3tDq5u2UBwISQI+3rd8cNh2lCvYhgUOn8YR04ZIPQELQ6yKIbFQToQ0Y9+bV AEvYcD6j9InusAFyQgHKSQrryGlVO484uzjmVgHo= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sat, 7 Jul 2018 22:01:19 +0200 Message-Id: <20180707200121.2684-2-sven@narfation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180707200121.2684-1-sven@narfation.org> References: <20180707200121.2684-1-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: Unify include guards style X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" All other include guards in batman-adv use the style: * _NET_BATMAN_ADV_$(FILENAME)_ * uppercase only * "." & "-" replaced with "_" Use this also in the B.A.T.M.A.N. IV/V OGM implementation headers. Signed-off-by: Sven Eckelmann --- net/batman-adv/bat_iv_ogm.h | 6 +++--- net/batman-adv/bat_v_ogm.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net/batman-adv/bat_iv_ogm.h b/net/batman-adv/bat_iv_ogm.h index 317cafd3..3dc6a7a4 100644 --- a/net/batman-adv/bat_iv_ogm.h +++ b/net/batman-adv/bat_iv_ogm.h @@ -16,11 +16,11 @@ * along with this program; if not, see . */ -#ifndef _BATMAN_ADV_BATADV_IV_OGM_H_ -#define _BATMAN_ADV_BATADV_IV_OGM_H_ +#ifndef _NET_BATMAN_ADV_BAT_IV_OGM_H_ +#define _NET_BATMAN_ADV_BAT_IV_OGM_H_ #include "main.h" int batadv_iv_init(void); -#endif /* _BATMAN_ADV_BATADV_IV_OGM_H_ */ +#endif /* _NET_BATMAN_ADV_BAT_IV_OGM_H_ */ diff --git a/net/batman-adv/bat_v_ogm.h b/net/batman-adv/bat_v_ogm.h index ed36c5e7..e5be14c9 100644 --- a/net/batman-adv/bat_v_ogm.h +++ b/net/batman-adv/bat_v_ogm.h @@ -16,8 +16,8 @@ * along with this program; if not, see . */ -#ifndef _BATMAN_ADV_BATADV_V_OGM_H_ -#define _BATMAN_ADV_BATADV_V_OGM_H_ +#ifndef _NET_BATMAN_ADV_BAT_V_OGM_H_ +#define _NET_BATMAN_ADV_BAT_V_OGM_H_ #include "main.h" @@ -34,4 +34,4 @@ void batadv_v_ogm_primary_iface_set(struct batadv_hard_iface *primary_iface); int batadv_v_ogm_packet_recv(struct sk_buff *skb, struct batadv_hard_iface *if_incoming); -#endif /* _BATMAN_ADV_BATADV_V_OGM_H_ */ +#endif /* _NET_BATMAN_ADV_BAT_V_OGM_H_ */ From patchwork Sat Jul 7 20:01:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17418 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 2509482B83; Sat, 7 Jul 2018 22:01:33 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.b="0ngA6bXz"; dkim-atps=neutral Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:4d88:2000:7::2; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver= Received: from v3-1039.vlinux.de (narfation.org [IPv6:2001:4d88:2000:7::2]) by open-mesh.org (Postfix) with ESMTPS id 1DCFA82B7F for ; Sat, 7 Jul 2018 22:01:32 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593EBBFFD0000000000004065.dip0.t-ipconnect.de [IPv6:2003:c5:93eb:bffd::4065]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id AFBE9110118; Sat, 7 Jul 2018 22:01:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1530993691; bh=8bmFDtD+pOl6BczIjVbxokhGJapf62ktd5wsYTpZ0oA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0ngA6bXzNM131kVWeYebFpA18pVZseJcHuOPEK318OBFLW8lKMeaIFEb5+LB1BPrP DJhXB4PRxrObjC9v0KNme/8WUe6iRS88wn7dhXUK6+1m5Crv18aNfBLY3a2dHEBAld Ax4gOUNyg+PeII3Ah4WxJGHTR9R3ALaVqQqq2N0E= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sat, 7 Jul 2018 22:01:20 +0200 Message-Id: <20180707200121.2684-3-sven@narfation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180707200121.2684-1-sven@narfation.org> References: <20180707200121.2684-1-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH 2/3] batman-adv: Join batadv_purge_orig_ref and _batadv_purge_orig X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The single line function batadv_purge_orig_ref has no function beside providing the name used by other source files. This can also be done simpler by just renaming _batadv_purge_orig to batadv_purge_orig_ref. Signed-off-by: Sven Eckelmann --- net/batman-adv/originator.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index 716e5b43..1d295da3 100644 --- a/net/batman-adv/originator.c +++ b/net/batman-adv/originator.c @@ -1339,7 +1339,11 @@ static bool batadv_purge_orig_node(struct batadv_priv *bat_priv, return false; } -static void _batadv_purge_orig(struct batadv_priv *bat_priv) +/** + * batadv_purge_orig_ref() - Purge all outdated originators + * @bat_priv: the bat priv with all the soft interface information + */ +void batadv_purge_orig_ref(struct batadv_priv *bat_priv) { struct batadv_hashtable *hash = bat_priv->orig_hash; struct hlist_node *node_tmp; @@ -1385,21 +1389,12 @@ static void batadv_purge_orig(struct work_struct *work) delayed_work = to_delayed_work(work); bat_priv = container_of(delayed_work, struct batadv_priv, orig_work); - _batadv_purge_orig(bat_priv); + batadv_purge_orig_ref(bat_priv); queue_delayed_work(batadv_event_workqueue, &bat_priv->orig_work, msecs_to_jiffies(BATADV_ORIG_WORK_PERIOD)); } -/** - * batadv_purge_orig_ref() - Purge all outdated originators - * @bat_priv: the bat priv with all the soft interface information - */ -void batadv_purge_orig_ref(struct batadv_priv *bat_priv) -{ - _batadv_purge_orig(bat_priv); -} - #ifdef CONFIG_BATMAN_ADV_DEBUGFS /** From patchwork Sat Jul 7 20:01:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17419 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 642B282B79; Sat, 7 Jul 2018 22:01:39 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.b="cYXqlHrh"; dkim-atps=neutral Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver= Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id CBA3E82B8B for ; Sat, 7 Jul 2018 22:01:36 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593EBBFFD0000000000004065.dip0.t-ipconnect.de [IPv6:2003:c5:93eb:bffd::4065]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 2ED3B110118; Sat, 7 Jul 2018 22:01:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1530993694; bh=DFekff9kCf1ZrdjzWGwqG9ynuVtrKxocMgkXkseTnGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cYXqlHrhXMl20EZB62UIzhx/KOe177Q99WaPwYb0zSS4p7IpMzouXeBF2PbYJ2NHy Ufec2u3yZY5c7l44cIRkau3nSCG3GMfesOi0hE1/V11KhYSRJVxYX6YYwAPSU5Gp/3 X/Gwbtb+xP54O3+h95IfhZzGwJX2G7qs/TR+QRa8= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sat, 7 Jul 2018 22:01:21 +0200 Message-Id: <20180707200121.2684-4-sven@narfation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180707200121.2684-1-sven@narfation.org> References: <20180707200121.2684-1-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH 3/3] batman-adv: Convert batadv_dat_addr_t to proper type X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The #define for batadv_dat_addr_t is doing nothing else than giving u16 a new typename. But C already has the special keyword "typedef" which is also better supported by kernel-doc. Signed-off-by: Sven Eckelmann Acked-by: Antonio Quartulli --- net/batman-adv/types.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index 360357f8..343d3048 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -43,12 +43,13 @@ struct seq_file; #ifdef CONFIG_BATMAN_ADV_DAT /** - * batadv_dat_addr_t - it is the type used for all DHT addresses. If it is - * changed, BATADV_DAT_ADDR_MAX is changed as well. + * typedef batadv_dat_addr_t - type used for all DHT addresses + * + * If it is changed, BATADV_DAT_ADDR_MAX is changed as well. * * *Please be careful: batadv_dat_addr_t must be UNSIGNED* */ -#define batadv_dat_addr_t u16 +typedef u16 batadv_dat_addr_t; #endif /* CONFIG_BATMAN_ADV_DAT */