pull request for net-next: batman-adv 2018-07-17
Subsystems (3)
Simon Wunderlich
maintainercover pull request for net-next: batman-adv 2018-07-17
Hi David,
here is a little cleanup pull request of batman-adv to go into net-next.
Please pull or let me know of any problem!
Thank you,
Simon
The following changes since commit ce397d215ccd07b8ae3f71db689aedb85d56ab40:
Linux 4.18-rc1 (2018-06-17 08:04:49 +0900)
are available in the git repository at:
git://git.open-mesh.org/linux-merge.git tags/batadv-next-for-davem-20180717
for you to fetch changes up to 993a4a5f7cd3aef53be3953d11f86b2d3630ebb8:
batman-adv: Convert batadv_dat_addr_t to proper type (2018-07-08 12:56:38 +0200)
----------------------------------------------------------------
This feature/cleanup patchset includes the following patches:
- Don't call BATMAN_V experimental in Kconfig anymore, by Sven Eckelmann
- Enable DAT by default at compile time, by Antonio Quartulli
- Remove obsolete default n in Kconfig, by Sven Eckelmann
- Fix checkpatch spelling errors, by Sven Eckelmann
- Unify header guards style, by Sven Eckelmann
- Consolidate batadv_purge_orig functions, by Sven Eckelmann
- Replace type define with proper typedef, by Sven Eckelmann
----------------------------------------------------------------
Antonio Quartulli (1):
batman-adv: enable DAT by default at compile time
Sven Eckelmann (6):
batman-adv: Drop "experimental" from BATMAN_V Kconfig
batman-adv: Remove "default n" in Kconfig
batman-adv: fix checkpatch warning about misspelled "cache"
batman-adv: Unify include guards style
batman-adv: Join batadv_purge_orig_ref and _batadv_purge_orig
batman-adv: Convert batadv_dat_addr_t to proper type
net/batman-adv/Kconfig | 8 ++------ net/batman-adv/bat_iv_ogm.h | 6 +++--- net/batman-adv/bat_v_ogm.h | 6 +++--- net/batman-adv/debugfs.c | 2 +- net/batman-adv/originator.c | 17 ++++++----------- net/batman-adv/types.h | 7 ++++--- 6 files changed, 19 insertions(+), 27 deletions(-)
Simon Wunderlich
maintainerPATCH 1/7 batman-adv: Drop "experimental" from BATMAN_V Kconfig
From: Sven Eckelmann <[email protected]>
The Kconfig option BATMAN_ADV_BATMAN_V is now enabled by default when the BATMAN_ADV is enabled. A feature which is enabled by default for a module should not be considered experimental.
--- net/batman-adv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/batman-adv/Kconfig +1 -1
@@ -33,7 +33,7 @@ config BATMAN_ADV tools. config BATMAN_ADV_BATMAN_V - bool "B.A.T.M.A.N. V protocol (experimental)" + bool "B.A.T.M.A.N. V protocol" depends on BATMAN_ADV && !(CFG80211=m && BATMAN_ADV=y) default y help
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 2/7 batman-adv: enable DAT by default at compile time
In reply to Simon WunderlichFrom: Antonio Quartulli <[email protected]>
DAT (Distributed ARP Table) has been enabled by default in the out-of-tree batman-adv kernel module for several years already.
It can now be enabled in the kernel too.
--- net/batman-adv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/batman-adv/Kconfig +1 -1
@@ -60,7 +60,7 @@ config BATMAN_ADV_BLA config BATMAN_ADV_DAT bool "Distributed ARP Table" depends on BATMAN_ADV && INET - default n + default y help This option enables DAT (Distributed ARP Table), a DHT based mechanism that increases ARP reliability on sparse wireless
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 3/7 batman-adv: Remove "default n" in Kconfig
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The "default n" is the default value for any bool or tristate Kconfig setting. It is therefore not necessary to add it to a config entry.
--- net/batman-adv/Kconfig | 4 ---- 1 file changed, 4 deletions(-)
net/batman-adv/Kconfig +0 -4
@@ -24,7 +24,6 @@ config BATMAN_ADV depends on NET select CRC16 select LIBCRC32C - default n help B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is a routing protocol for multi-hop ad-hoc mesh networks. The
@@ -70,7 +69,6 @@ config BATMAN_ADV_DAT config BATMAN_ADV_NC bool "Network Coding" depends on BATMAN_ADV - default n help This option enables network coding, a mechanism that aims to increase the overall network throughput by fusing multiple
@@ -84,7 +82,6 @@ config BATMAN_ADV_NC config BATMAN_ADV_MCAST bool "Multicast optimisation" depends on BATMAN_ADV && INET && !(BRIDGE=m && BATMAN_ADV=y) - default n help This option enables the multicast optimisation which aims to reduce the air overhead while improving the reliability of
@@ -94,7 +91,6 @@ config BATMAN_ADV_DEBUGFS bool "batman-adv debugfs entries" depends on BATMAN_ADV depends on DEBUG_FS - default n help Enable this to export routing related debug tables via debugfs. The information for each soft-interface and used hard-interface can be
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 4/7 batman-adv: fix checkpatch warning about misspelled "cache"
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
commit a2d4df9b673c ("spelling.txt: add more spellings to spelling.txt") introduced the spellcheck of "cache" for checkpatch.pl.
--- net/batman-adv/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/batman-adv/debugfs.c +1 -1
@@ -117,7 +117,7 @@ static int batadv_bla_backbone_table_open(struct inode *inode,#ifdef CONFIG_BATMAN_ADV_DAT /** -* batadv_dat_cache_open() - Prepare file handler for reads from dat_chache +* batadv_dat_cache_open() - Prepare file handler for reads from dat_cache * @inode: inode which was opened * @file: file handle to be initialized *
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 5/7 batman-adv: Unify include guards style
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
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.
--- net/batman-adv/bat_iv_ogm.h | 6 +++--- net/batman-adv/bat_v_ogm.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
net/batman-adv/bat_iv_ogm.h +3 -3
@@ -16,11 +16,11 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#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_ */
net/batman-adv/bat_v_ogm.h +3 -3
@@ -16,8 +16,8 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ -#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_ */
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 6/7 batman-adv: Join batadv_purge_orig_ref and _batadv_purge_orig
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
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.
--- net/batman-adv/originator.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-)
net/batman-adv/originator.c +6 -11
@@ -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 /**
Signature · 1 line
2.11.0
Simon Wunderlich
maintainerPATCH 7/7 batman-adv: Convert batadv_dat_addr_t to proper type
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
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.
--- net/batman-adv/types.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
net/batman-adv/types.h +4 -3
@@ -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 */
Signature · 1 line
2.11.0
David Miller
maintainerFrom: Simon Wunderlich <[email protected]>
Date: Tue, 17 Jul 2018 17:26:42 +0200
Quoted 3 lines
here is a little cleanup pull request of batman-adv to go into net-next.
Please pull or let me know of any problem!
Pulled, thank you.