pull request for net-next: batman-adv 2020-08-24
Subsystems (3)
Simon Wunderlich
maintainercover pull request for net-next: batman-adv 2020-08-24
Hi David,
here is a small 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 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5:
Linux 5.9-rc1 (2020-08-16 13:04:57 -0700)
are available in the Git repository at:
git://git.open-mesh.org/linux-merge.git tags/batadv-next-for-davem-20200824
for you to fetch changes up to 0093870aa891594d170e1dc9aa192a30d530d755:
batman-adv: Migrate to linux/prandom.h (2020-08-18 19:39:54 +0200)
----------------------------------------------------------------
This cleanup patchset includes the following patches:
- bump version strings, by Simon Wunderlich
- Drop unused function batadv_hardif_remove_interfaces(), by Sven Eckelmann
- delete duplicated words, by Randy Dunlap
- Drop (even more) repeated words in comments, by Sven Eckelmann
- Migrate to linux/prandom.h, by Sven Eckelmann
----------------------------------------------------------------
Randy Dunlap (1):
batman-adv: types.h: delete duplicated words
Simon Wunderlich (1):
batman-adv: Start new development cycle
Sven Eckelmann (3):
batman-adv: Drop unused function batadv_hardif_remove_interfaces()
batman-adv: Drop repeated words in comments
batman-adv: Migrate to linux/prandom.h
net/batman-adv/bat_iv_ogm.c | 1 + net/batman-adv/bat_v_elp.c | 1 + net/batman-adv/bat_v_ogm.c | 1 + net/batman-adv/bridge_loop_avoidance.c | 2 +- net/batman-adv/fragmentation.c | 2 +- net/batman-adv/hard-interface.c | 19 +------------------ net/batman-adv/hard-interface.h | 1 - net/batman-adv/main.c | 1 - net/batman-adv/main.h | 2 +- net/batman-adv/multicast.c | 2 +- net/batman-adv/network-coding.c | 4 ++-- net/batman-adv/send.c | 2 +- net/batman-adv/soft-interface.c | 4 ++-- net/batman-adv/types.h | 4 ++-- 14 files changed, 15 insertions(+), 31 deletions(-)
Simon Wunderlich
maintainerPATCH 1/5 batman-adv: Start new development cycle
--- net/batman-adv/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/batman-adv/main.h +1 -1
@@ -13,7 +13,7 @@#define BATADV_DRIVER_DEVICE "batman-adv"#ifndef BATADV_SOURCE_VERSION -#define BATADV_SOURCE_VERSION "2020.3" +#define BATADV_SOURCE_VERSION "2020.4"#endif /* B.A.T.M.A.N. parameters */
Signature · 1 line
2.20.1
Simon Wunderlich
maintainerPATCH 2/5 batman-adv: Drop unused function batadv_hardif_remove_interfaces()
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The function batadv_hardif_remove_interfaces was meant to remove all interfaces which are currently in the list of known (compatible) hardifs during module unload. But the function unregister_netdevice_notifier is called in batadv_exit before batadv_hardif_remove_interfaces. This will trigger NETDEV_UNREGISTER events for all available interfaces and in this process remove all interfaces from batadv_hardif_list. And batadv_hardif_remove_interfaces only operated on this (empty) list.
--- net/batman-adv/hard-interface.c | 17 ----------------- net/batman-adv/hard-interface.h | 1 - net/batman-adv/main.c | 1 - 3 files changed, 19 deletions(-)
net/batman-adv/hard-interface.c +0 -17
@@ -976,23 +976,6 @@ static void batadv_hardif_remove_interface(struct batadv_hard_iface *hard_iface)batadv_hardif_put (hard_iface); } -/** -* batadv_hardif_remove_interfaces() - Remove all hard interfaces -*/ -void batadv_hardif_remove_interfaces (void ) -{ -struct batadv_hard_iface *hard_iface, *hard_iface_tmp; - -rtnl_lock (); -list_for_each_entry_safe (hard_iface, hard_iface_tmp, - &batadv_hardif_list, list) { -list_del_rcu (&hard_iface->list); - batadv_hardif_generation++; -batadv_hardif_remove_interface (hard_iface); - } -rtnl_unlock (); -} -/** * batadv_hard_if_event_softif() - Handle events for soft interfaces * @event: NETDEV_* event to handle
net/batman-adv/hard-interface.h +0 -1
@@ -100,7 +100,6 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface, struct net *net, const char *iface_name);void batadv_hardif_disable_interface (struct batadv_hard_iface *hard_iface,enum batadv_hard_if_cleanup autodel); -void batadv_hardif_remove_interfaces (void );int batadv_hardif_min_mtu (struct net_device *soft_iface);void batadv_update_min_mtu (struct net_device *soft_iface);void batadv_hardif_release (struct kref *ref);
net/batman-adv/main.c +0 -1
@@ -137,7 +137,6 @@ static void __exit batadv_exit(void)batadv_netlink_unregister ();rtnl_link_unregister (&batadv_link_ops);unregister_netdevice_notifier (&batadv_hard_if_notifier); -batadv_hardif_remove_interfaces ();flush_workqueue (batadv_event_workqueue);destroy_workqueue (batadv_event_workqueue);
Signature · 1 line
2.20.1
Simon Wunderlich
maintainerPATCH 3/5 batman-adv: types.h: delete duplicated words
In reply to Simon WunderlichFrom: Randy Dunlap <[email protected]>
Delete the doubled word "time" in a comment. Delete the doubled word "address" in a comment.
--- net/batman-adv/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/batman-adv/types.h +2 -2
@@ -1492,7 +1492,7 @@ struct batadv_tp_vars {/** @unacked_lock: protect unacked_list */ spinlock_t unacked_lock; -/** @last_recv_time: time time (jiffies) a msg was received */ +/** @last_recv_time: time (jiffies) a msg was received */ unsigned long last_recv_time;/** @refcount: number of context where the object is used */
@@ -1996,7 +1996,7 @@ struct batadv_tt_change_node {*/ struct batadv_tt_req_node {/** -* @addr: mac address address of the originator this request was sent to +* @addr: mac address of the originator this request was sent to */ u8 addr[ETH_ALEN ];
Signature · 1 line
2.20.1
Simon Wunderlich
maintainerPATCH 4/5 batman-adv: Drop repeated words in comments
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
checkpatch found various instances of "Possible repeated word" in various comments.
--- net/batman-adv/bridge_loop_avoidance.c | 2 +- net/batman-adv/fragmentation.c | 2 +- net/batman-adv/hard-interface.c | 2 +- net/batman-adv/multicast.c | 2 +- net/batman-adv/network-coding.c | 2 +- net/batman-adv/send.c | 2 +- net/batman-adv/soft-interface.c | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-)
net/batman-adv/bridge_loop_avoidance.c +1 -1
@@ -1795,7 +1795,7 @@ batadv_bla_loopdetect_check(struct batadv_priv *bat_priv, struct sk_buff *skb, ret =queue_work (batadv_event_workqueue, &backbone_gw->report_work); -/* backbone_gw is unreferenced in the report work function function +/* backbone_gw is unreferenced in the report work function * if queue_work() call was successful */ if (!ret)
net/batman-adv/fragmentation.c +1 -1
@@ -306,7 +306,7 @@ batadv_frag_merge_packets(struct hlist_head *chain)* set *skb to merged packet; 2) Packet is buffered: Return true and set *skb * to NULL; 3) Error: Return false and free skb. * -* Return: true when the packet is merged or buffered, false when skb is not not +* Return: true when the packet is merged or buffered, false when skb is not * used. */ bool batadv_frag_skb_buffer(struct sk_buff **skb,
net/batman-adv/hard-interface.c +1 -1
@@ -599,7 +599,7 @@ int batadv_hardif_min_mtu(struct net_device *soft_iface)/* report to the other components the maximum amount of bytes that * batman-adv can send over the wire (without considering the payload * overhead). For example, this value is used by TT to compute the -* maximum local table table size +* maximum local table size */ atomic_set (&bat_priv->packet_size_max, min_mtu);
net/batman-adv/multicast.c +1 -1
@@ -207,7 +207,7 @@ static u8 batadv_mcast_mla_rtr_flags_bridge_get(struct batadv_priv *bat_priv,return BATADV_MCAST_WANT_NO_RTR4 |BATADV_MCAST_WANT_NO_RTR6 ;/* TODO: ask the bridge if a multicast router is present (the bridge -* is capable of performing proper RFC4286 multicast multicast router +* is capable of performing proper RFC4286 multicast router * discovery) instead of searching for a ff02::2 listener here */ ret =br_multicast_list_adjacent (dev, &bridge_mcast_list);
net/batman-adv/network-coding.c +1 -1
@@ -250,7 +250,7 @@ static void batadv_nc_path_put(struct batadv_nc_path *nc_path)/** * batadv_nc_packet_free() - frees nc packet * @nc_packet: the nc packet to free -* @dropped: whether the packet is freed because is is dropped +* @dropped: whether the packet is freed because is dropped */ static void batadv_nc_packet_free (struct batadv_nc_packet *nc_packet,bool dropped)
net/batman-adv/send.c +1 -1
@@ -461,7 +461,7 @@ int batadv_send_skb_via_gw(struct batadv_priv *bat_priv, struct sk_buff *skb,/** * batadv_forw_packet_free() - free a forwarding packet * @forw_packet: The packet to free -* @dropped: whether the packet is freed because is is dropped +* @dropped: whether the packet is freed because is dropped * * This frees a forwarding packet and releases any resources it might * have claimed.
net/batman-adv/soft-interface.c +2 -2
@@ -649,7 +649,7 @@ static void batadv_softif_destroy_vlan(struct batadv_priv *bat_priv,/** * batadv_interface_add_vid() - ndo_add_vid API implementation * @dev: the netdev of the mesh interface -* @proto: protocol of the the vlan id +* @proto: protocol of the vlan id * @vid: identifier of the new vlan * * Set up all the internal structures for handling the new vlan on top of the
@@ -707,7 +707,7 @@ static int batadv_interface_add_vid(struct net_device *dev, __be16 proto,/** * batadv_interface_kill_vid() - ndo_kill_vid API implementation * @dev: the netdev of the mesh interface -* @proto: protocol of the the vlan id +* @proto: protocol of the vlan id * @vid: identifier of the deleted vlan * * Destroy all the internal structures used to handle the vlan identified by vid
Signature · 1 line
2.20.1
Simon Wunderlich
maintainerPATCH 5/5 batman-adv: Migrate to linux/prandom.h
In reply to Simon WunderlichFrom: Sven Eckelmann <[email protected]>
The commit c0842fbc1b18 ("random32: move the pseudo-random 32-bit definitions to prandom.h") introduced a new header for the pseudo random functions from (previously) linux/random.h. One future goal of the prandom.h change is to make code to switch just the new header file and to avoid the implicit include. This would allow the removal of the implicit include from random.h
--- net/batman-adv/bat_iv_ogm.c | 1 + net/batman-adv/bat_v_elp.c | 1 + net/batman-adv/bat_v_ogm.c | 1 + net/batman-adv/network-coding.c | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-)
net/batman-adv/bat_iv_ogm.c +1 -0
@@ -27,6 +27,7 @@#include <linux/netdevice.h> #include <linux/netlink.h> #include <linux/pkt_sched.h> +#include <linux/prandom.h> #include <linux/printk.h> #include <linux/random.h> #include <linux/rculist.h>
net/batman-adv/bat_v_elp.c +1 -0
@@ -20,6 +20,7 @@#include <linux/kref.h> #include <linux/netdevice.h> #include <linux/nl80211.h> +#include <linux/prandom.h> #include <linux/random.h> #include <linux/rculist.h> #include <linux/rcupdate.h>
net/batman-adv/bat_v_ogm.c +1 -0
@@ -20,6 +20,7 @@#include <linux/lockdep.h> #include <linux/mutex.h> #include <linux/netdevice.h> +#include <linux/prandom.h> #include <linux/random.h> #include <linux/rculist.h> #include <linux/rcupdate.h>
net/batman-adv/network-coding.c +1 -1
@@ -26,8 +26,8 @@#include <linux/lockdep.h> #include <linux/net.h> #include <linux/netdevice.h> +#include <linux/prandom.h> #include <linux/printk.h> -#include <linux/random.h> #include <linux/rculist.h> #include <linux/rcupdate.h> #include <linux/seq_file.h>
Signature · 1 line
2.20.1
David Miller
maintainerFrom: Simon Wunderlich <[email protected]>
Date: Mon, 24 Aug 2020 18:27:36 +0200
Quoted 3 lines
here is a small cleanup pull request of batman-adv to go into net-next.
Please pull or let me know of any problem!
Also pulled, thank you.