[linux-next] LinuxNextTracking branch, master, updated. next-20171221

batman at open-mesh.org batman at open-mesh.org
Fri Dec 22 00:16:33 CET 2017


The following commit has been merged in the master branch:
commit a943e8bc058977663ba1e42389d4f5643cf2ae9e
Merge: b2597f78d4831f2be288b220fcce5c4a9a63abec ff15c27c97303fbe5abc49c25c73ea299ab72d31
Author: David S. Miller <davem at davemloft.net>
Date:   Wed Dec 20 14:33:03 2017 -0500

    Merge tag 'batadv-next-for-davem-20171220' of git://git.open-mesh.org/linux-merge
    
    Simon Wunderlich says:
    
    ====================
    This feature/cleanup patchset includes the following patches:
    
     - bump version strings, by Simon Wunderlich
    
     - de-inline hash functions to save memory footprint, by Denys Vlasenko
    
     - Add License information to various files, by Sven Eckelmann (3 patches)
    
     - Change batman_adv.h from ISC to MIT, by Sven Eckelmann
    
     - Improve various includes, by Sven Eckelmann (5 patches)
    
     - Lots of kernel-doc work by Sven Eckelmann (8 patches)
    ====================
    
    Signed-off-by: David S. Miller <davem at davemloft.net>

diff --combined net/batman-adv/bat_iv_ogm.c
index bbe8414b6ee7,c9955f29a2bf..84c36430c25a
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0
  /* Copyright (C) 2007-2017  B.A.T.M.A.N. contributors:
   *
   * Marek Lindner, Simon Wunderlich
@@@ -26,7 -27,7 +27,7 @@@
  #include <linux/cache.h>
  #include <linux/errno.h>
  #include <linux/etherdevice.h>
- #include <linux/fs.h>
+ #include <linux/gfp.h>
  #include <linux/if_ether.h>
  #include <linux/init.h>
  #include <linux/jiffies.h>
@@@ -72,21 -73,28 +73,28 @@@ static void batadv_iv_send_outstanding_
  
  /**
   * enum batadv_dup_status - duplicate status
-  * @BATADV_NO_DUP: the packet is no duplicate
-  * @BATADV_ORIG_DUP: OGM is a duplicate in the originator (but not for the
-  *  neighbor)
-  * @BATADV_NEIGH_DUP: OGM is a duplicate for the neighbor
-  * @BATADV_PROTECTED: originator is currently protected (after reboot)
   */
  enum batadv_dup_status {
+ 	/** @BATADV_NO_DUP: the packet is no duplicate */
  	BATADV_NO_DUP = 0,
+ 
+ 	/**
+ 	 * @BATADV_ORIG_DUP: OGM is a duplicate in the originator (but not for
+ 	 *  the neighbor)
+ 	 */
  	BATADV_ORIG_DUP,
+ 
+ 	/** @BATADV_NEIGH_DUP: OGM is a duplicate for the neighbor */
  	BATADV_NEIGH_DUP,
+ 
+ 	/**
+ 	 * @BATADV_PROTECTED: originator is currently protected (after reboot)
+ 	 */
  	BATADV_PROTECTED,
  };
  
  /**
-  * batadv_ring_buffer_set - update the ring buffer with the given value
+  * batadv_ring_buffer_set() - update the ring buffer with the given value
   * @lq_recv: pointer to the ring buffer
   * @lq_index: index to store the value at
   * @value: value to store in the ring buffer
@@@ -98,7 -106,7 +106,7 @@@ static void batadv_ring_buffer_set(u8 l
  }
  
  /**
-  * batadv_ring_buffer_avg - compute the average of all non-zero values stored
+  * batadv_ring_buffer_avg() - compute the average of all non-zero values stored
   * in the given ring buffer
   * @lq_recv: pointer to the ring buffer
   *
@@@ -130,7 -138,7 +138,7 @@@ static u8 batadv_ring_buffer_avg(const 
  }
  
  /**
-  * batadv_iv_ogm_orig_free - free the private resources allocated for this
+  * batadv_iv_ogm_orig_free() - free the private resources allocated for this
   *  orig_node
   * @orig_node: the orig_node for which the resources have to be free'd
   */
@@@ -141,8 -149,8 +149,8 @@@ static void batadv_iv_ogm_orig_free(str
  }
  
  /**
-  * batadv_iv_ogm_orig_add_if - change the private structures of the orig_node to
-  *  include the new hard-interface
+  * batadv_iv_ogm_orig_add_if() - change the private structures of the orig_node
+  *  to include the new hard-interface
   * @orig_node: the orig_node that has to be changed
   * @max_if_num: the current amount of interfaces
   *
@@@ -186,7 -194,7 +194,7 @@@ unlock
  }
  
  /**
-  * batadv_iv_ogm_drop_bcast_own_entry - drop section of bcast_own
+  * batadv_iv_ogm_drop_bcast_own_entry() - drop section of bcast_own
   * @orig_node: the orig_node that has to be changed
   * @max_if_num: the current amount of interfaces
   * @del_if_num: the index of the interface being removed
@@@ -224,7 -232,7 +232,7 @@@ batadv_iv_ogm_drop_bcast_own_entry(stru
  }
  
  /**
-  * batadv_iv_ogm_drop_bcast_own_sum_entry - drop section of bcast_own_sum
+  * batadv_iv_ogm_drop_bcast_own_sum_entry() - drop section of bcast_own_sum
   * @orig_node: the orig_node that has to be changed
   * @max_if_num: the current amount of interfaces
   * @del_if_num: the index of the interface being removed
@@@ -259,8 -267,8 +267,8 @@@ batadv_iv_ogm_drop_bcast_own_sum_entry(
  }
  
  /**
-  * batadv_iv_ogm_orig_del_if - change the private structures of the orig_node to
-  *  exclude the removed interface
+  * batadv_iv_ogm_orig_del_if() - change the private structures of the orig_node
+  *  to exclude the removed interface
   * @orig_node: the orig_node that has to be changed
   * @max_if_num: the current amount of interfaces
   * @del_if_num: the index of the interface being removed
@@@ -290,7 -298,8 +298,8 @@@ static int batadv_iv_ogm_orig_del_if(st
  }
  
  /**
-  * batadv_iv_ogm_orig_get - retrieve or create (if does not exist) an originator
+  * batadv_iv_ogm_orig_get() - retrieve or create (if does not exist) an
+  *  originator
   * @bat_priv: the bat priv with all the soft interface information
   * @addr: mac address of the originator
   *
@@@ -447,7 -456,7 +456,7 @@@ static u8 batadv_hop_penalty(u8 tq, con
  }
  
  /**
-  * batadv_iv_ogm_aggr_packet - checks if there is another OGM attached
+  * batadv_iv_ogm_aggr_packet() - checks if there is another OGM attached
   * @buff_pos: current position in the skb
   * @packet_len: total length of the skb
   * @tvlv_len: tvlv length of the previously considered OGM
@@@ -557,7 -566,7 +566,7 @@@ static void batadv_iv_ogm_emit(struct b
  }
  
  /**
-  * batadv_iv_ogm_can_aggregate - find out if an OGM can be aggregated on an
+  * batadv_iv_ogm_can_aggregate() - find out if an OGM can be aggregated on an
   *  existing forward packet
   * @new_bat_ogm_packet: OGM packet to be aggregated
   * @bat_priv: the bat priv with all the soft interface information
@@@ -660,7 -669,7 +669,7 @@@ out
  }
  
  /**
-  * batadv_iv_ogm_aggregate_new - create a new aggregated packet and add this
+  * batadv_iv_ogm_aggregate_new() - create a new aggregated packet and add this
   *  packet to it.
   * @packet_buff: pointer to the OGM
   * @packet_len: (total) length of the OGM
@@@ -743,7 -752,7 +752,7 @@@ static void batadv_iv_ogm_aggregate(str
  }
  
  /**
-  * batadv_iv_ogm_queue_add - queue up an OGM for transmission
+  * batadv_iv_ogm_queue_add() - queue up an OGM for transmission
   * @bat_priv: the bat priv with all the soft interface information
   * @packet_buff: pointer to the OGM
   * @packet_len: (total) length of the OGM
@@@ -869,8 -878,8 +878,8 @@@ static void batadv_iv_ogm_forward(struc
  }
  
  /**
-  * batadv_iv_ogm_slide_own_bcast_window - bitshift own OGM broadcast windows for
-  * the given interface
+  * batadv_iv_ogm_slide_own_bcast_window() - bitshift own OGM broadcast windows
+  *  for the given interface
   * @hard_iface: the interface for which the windows have to be shifted
   */
  static void
@@@ -987,7 -996,7 +996,7 @@@ out
  }
  
  /**
-  * batadv_iv_ogm_orig_update - use OGM to update corresponding data in an
+  * batadv_iv_ogm_orig_update() - use OGM to update corresponding data in an
   *  originator
   * @bat_priv: the bat priv with all the soft interface information
   * @orig_node: the orig node who originally emitted the ogm packet
@@@ -1152,7 -1161,7 +1161,7 @@@ out
  }
  
  /**
-  * batadv_iv_ogm_calc_tq - calculate tq for current received ogm packet
+  * batadv_iv_ogm_calc_tq() - calculate tq for current received ogm packet
   * @orig_node: the orig node who originally emitted the ogm packet
   * @orig_neigh_node: the orig node struct of the neighbor who sent the packet
   * @batadv_ogm_packet: the ogm packet
@@@ -1214,7 -1223,7 +1223,7 @@@ static bool batadv_iv_ogm_calc_tq(struc
  	orig_node->last_seen = jiffies;
  
  	/* find packet count of corresponding one hop neighbor */
 -	spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock);
 +	spin_lock_bh(&orig_neigh_node->bat_iv.ogm_cnt_lock);
  	if_num = if_incoming->if_num;
  	orig_eq_count = orig_neigh_node->bat_iv.bcast_own_sum[if_num];
  	neigh_ifinfo = batadv_neigh_ifinfo_new(neigh_node, if_outgoing);
@@@ -1224,7 -1233,7 +1233,7 @@@
  	} else {
  		neigh_rq_count = 0;
  	}
 -	spin_unlock_bh(&orig_node->bat_iv.ogm_cnt_lock);
 +	spin_unlock_bh(&orig_neigh_node->bat_iv.ogm_cnt_lock);
  
  	/* pay attention to not get a value bigger than 100 % */
  	if (orig_eq_count > neigh_rq_count)
@@@ -1298,7 -1307,7 +1307,7 @@@ out
  }
  
  /**
-  * batadv_iv_ogm_update_seqnos -  process a batman packet for all interfaces,
+  * batadv_iv_ogm_update_seqnos() -  process a batman packet for all interfaces,
   *  adjust the sequence number and find out whether it is a duplicate
   * @ethhdr: ethernet header of the packet
   * @batadv_ogm_packet: OGM packet to be considered
@@@ -1401,7 -1410,8 +1410,8 @@@ out
  }
  
  /**
-  * batadv_iv_ogm_process_per_outif - process a batman iv OGM for an outgoing if
+  * batadv_iv_ogm_process_per_outif() - process a batman iv OGM for an outgoing
+  *  interface
   * @skb: the skb containing the OGM
   * @ogm_offset: offset from skb->data to start of ogm header
   * @orig_node: the (cached) orig node for the originator of this OGM
@@@ -1608,7 -1618,7 +1618,7 @@@ out
  }
  
  /**
-  * batadv_iv_ogm_process - process an incoming batman iv OGM
+  * batadv_iv_ogm_process() - process an incoming batman iv OGM
   * @skb: the skb containing the OGM
   * @ogm_offset: offset to the OGM which should be processed (for aggregates)
   * @if_incoming: the interface where this packet was receved
@@@ -1861,7 -1871,7 +1871,7 @@@ free_skb
  
  #ifdef CONFIG_BATMAN_ADV_DEBUGFS
  /**
-  * batadv_iv_ogm_orig_print_neigh - print neighbors for the originator table
+  * batadv_iv_ogm_orig_print_neigh() - print neighbors for the originator table
   * @orig_node: the orig_node for which the neighbors are printed
   * @if_outgoing: outgoing interface for these entries
   * @seq: debugfs table seq_file struct
@@@ -1890,7 -1900,7 +1900,7 @@@ batadv_iv_ogm_orig_print_neigh(struct b
  }
  
  /**
-  * batadv_iv_ogm_orig_print - print the originator table
+  * batadv_iv_ogm_orig_print() - print the originator table
   * @bat_priv: the bat priv with all the soft interface information
   * @seq: debugfs table seq_file struct
   * @if_outgoing: the outgoing interface for which this should be printed
@@@ -1960,7 -1970,7 +1970,7 @@@ next
  #endif
  
  /**
-  * batadv_iv_ogm_neigh_get_tq_avg - Get the TQ average for a neighbour on a
+  * batadv_iv_ogm_neigh_get_tq_avg() - Get the TQ average for a neighbour on a
   *  given outgoing interface.
   * @neigh_node: Neighbour of interest
   * @if_outgoing: Outgoing interface of interest
@@@ -1986,7 -1996,7 +1996,7 @@@ batadv_iv_ogm_neigh_get_tq_avg(struct b
  }
  
  /**
-  * batadv_iv_ogm_orig_dump_subentry - Dump an originator subentry into a
+  * batadv_iv_ogm_orig_dump_subentry() - Dump an originator subentry into a
   *  message
   * @msg: Netlink message to dump into
   * @portid: Port making netlink request
@@@ -2048,7 -2058,7 +2058,7 @@@ batadv_iv_ogm_orig_dump_subentry(struc
  }
  
  /**
-  * batadv_iv_ogm_orig_dump_entry - Dump an originator entry into a message
+  * batadv_iv_ogm_orig_dump_entry() - Dump an originator entry into a message
   * @msg: Netlink message to dump into
   * @portid: Port making netlink request
   * @seq: Sequence number of netlink message
@@@ -2110,7 -2120,7 +2120,7 @@@ batadv_iv_ogm_orig_dump_entry(struct sk
  }
  
  /**
-  * batadv_iv_ogm_orig_dump_bucket - Dump an originator bucket into a
+  * batadv_iv_ogm_orig_dump_bucket() - Dump an originator bucket into a
   *  message
   * @msg: Netlink message to dump into
   * @portid: Port making netlink request
@@@ -2153,7 -2163,7 +2163,7 @@@ batadv_iv_ogm_orig_dump_bucket(struct s
  }
  
  /**
-  * batadv_iv_ogm_orig_dump - Dump the originators into a message
+  * batadv_iv_ogm_orig_dump() - Dump the originators into a message
   * @msg: Netlink message to dump into
   * @cb: Control block containing additional options
   * @bat_priv: The bat priv with all the soft interface information
@@@ -2190,7 -2200,7 +2200,7 @@@ batadv_iv_ogm_orig_dump(struct sk_buff 
  
  #ifdef CONFIG_BATMAN_ADV_DEBUGFS
  /**
-  * batadv_iv_hardif_neigh_print - print a single hop neighbour node
+  * batadv_iv_hardif_neigh_print() - print a single hop neighbour node
   * @seq: neighbour table seq_file struct
   * @hardif_neigh: hardif neighbour information
   */
@@@ -2209,7 -2219,7 +2219,7 @@@ batadv_iv_hardif_neigh_print(struct seq
  }
  
  /**
-  * batadv_iv_ogm_neigh_print - print the single hop neighbour list
+  * batadv_iv_ogm_neigh_print() - print the single hop neighbour list
   * @bat_priv: the bat priv with all the soft interface information
   * @seq: neighbour table seq_file struct
   */
@@@ -2242,7 -2252,7 +2252,7 @@@ static void batadv_iv_neigh_print(struc
  #endif
  
  /**
-  * batadv_iv_ogm_neigh_diff - calculate tq difference of two neighbors
+  * batadv_iv_ogm_neigh_diff() - calculate tq difference of two neighbors
   * @neigh1: the first neighbor object of the comparison
   * @if_outgoing1: outgoing interface for the first neighbor
   * @neigh2: the second neighbor object of the comparison
@@@ -2287,7 -2297,7 +2297,7 @@@ out
  }
  
  /**
-  * batadv_iv_ogm_neigh_dump_neigh - Dump a neighbour into a netlink message
+  * batadv_iv_ogm_neigh_dump_neigh() - Dump a neighbour into a netlink message
   * @msg: Netlink message to dump into
   * @portid: Port making netlink request
   * @seq: Sequence number of netlink message
@@@ -2326,7 -2336,7 +2336,7 @@@ batadv_iv_ogm_neigh_dump_neigh(struct s
  }
  
  /**
-  * batadv_iv_ogm_neigh_dump_hardif - Dump the neighbours of a hard interface
+  * batadv_iv_ogm_neigh_dump_hardif() - Dump the neighbours of a hard interface
   *  into a message
   * @msg: Netlink message to dump into
   * @portid: Port making netlink request
@@@ -2365,7 -2375,7 +2375,7 @@@ batadv_iv_ogm_neigh_dump_hardif(struct 
  }
  
  /**
-  * batadv_iv_ogm_neigh_dump - Dump the neighbours into a message
+  * batadv_iv_ogm_neigh_dump() - Dump the neighbours into a message
   * @msg: Netlink message to dump into
   * @cb: Control block containing additional options
   * @bat_priv: The bat priv with all the soft interface information
@@@ -2417,7 -2427,7 +2427,7 @@@ batadv_iv_ogm_neigh_dump(struct sk_buf
  }
  
  /**
-  * batadv_iv_ogm_neigh_cmp - compare the metrics of two neighbors
+  * batadv_iv_ogm_neigh_cmp() - compare the metrics of two neighbors
   * @neigh1: the first neighbor object of the comparison
   * @if_outgoing1: outgoing interface for the first neighbor
   * @neigh2: the second neighbor object of the comparison
@@@ -2443,7 -2453,7 +2453,7 @@@ static int batadv_iv_ogm_neigh_cmp(stru
  }
  
  /**
-  * batadv_iv_ogm_neigh_is_sob - check if neigh1 is similarly good or better
+  * batadv_iv_ogm_neigh_is_sob() - check if neigh1 is similarly good or better
   *  than neigh2 from the metric prospective
   * @neigh1: the first neighbor object of the comparison
   * @if_outgoing1: outgoing interface for the first neighbor
@@@ -2478,7 -2488,7 +2488,7 @@@ static void batadv_iv_iface_activate(st
  }
  
  /**
-  * batadv_iv_init_sel_class - initialize GW selection class
+  * batadv_iv_init_sel_class() - initialize GW selection class
   * @bat_priv: the bat priv with all the soft interface information
   */
  static void batadv_iv_init_sel_class(struct batadv_priv *bat_priv)
@@@ -2703,7 -2713,7 +2713,7 @@@ static void batadv_iv_gw_print(struct b
  #endif
  
  /**
-  * batadv_iv_gw_dump_entry - Dump a gateway into a message
+  * batadv_iv_gw_dump_entry() - Dump a gateway into a message
   * @msg: Netlink message to dump into
   * @portid: Port making netlink request
   * @seq: Sequence number of netlink message
@@@ -2774,7 -2784,7 +2784,7 @@@ out
  }
  
  /**
-  * batadv_iv_gw_dump - Dump gateways into a message
+  * batadv_iv_gw_dump() - Dump gateways into a message
   * @msg: Netlink message to dump into
   * @cb: Control block containing additional options
   * @bat_priv: The bat priv with all the soft interface information
@@@ -2843,6 -2853,11 +2853,11 @@@ static struct batadv_algo_ops batadv_ba
  	},
  };
  
+ /**
+  * batadv_iv_init() - B.A.T.M.A.N. IV initialization function
+  *
+  * Return: 0 on success or negative error number in case of failure
+  */
  int __init batadv_iv_init(void)
  {
  	int ret;
diff --combined net/batman-adv/bat_v.c
index e0e2bfcd6b3e,14ec3677c391..78ddf3afa83a
--- a/net/batman-adv/bat_v.c
+++ b/net/batman-adv/bat_v.c
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0
  /* Copyright (C) 2013-2017  B.A.T.M.A.N. contributors:
   *
   * Linus Lüssing, Marek Lindner
@@@ -99,7 -100,7 +100,7 @@@ static void batadv_v_primary_iface_set(
  }
  
  /**
-  * batadv_v_iface_update_mac - react to hard-interface MAC address change
+  * batadv_v_iface_update_mac() - react to hard-interface MAC address change
   * @hard_iface: the modified interface
   *
   * If the modified interface is the primary one, update the originator
@@@ -130,7 -131,7 +131,7 @@@ batadv_v_hardif_neigh_init(struct batad
  
  #ifdef CONFIG_BATMAN_ADV_DEBUGFS
  /**
-  * batadv_v_orig_print_neigh - print neighbors for the originator table
+  * batadv_v_orig_print_neigh() - print neighbors for the originator table
   * @orig_node: the orig_node for which the neighbors are printed
   * @if_outgoing: outgoing interface for these entries
   * @seq: debugfs table seq_file struct
@@@ -160,7 -161,7 +161,7 @@@ batadv_v_orig_print_neigh(struct batadv
  }
  
  /**
-  * batadv_v_hardif_neigh_print - print a single ELP neighbour node
+  * batadv_v_hardif_neigh_print() - print a single ELP neighbour node
   * @seq: neighbour table seq_file struct
   * @hardif_neigh: hardif neighbour information
   */
@@@ -181,7 -182,7 +182,7 @@@ batadv_v_hardif_neigh_print(struct seq_
  }
  
  /**
-  * batadv_v_neigh_print - print the single hop neighbour list
+  * batadv_v_neigh_print() - print the single hop neighbour list
   * @bat_priv: the bat priv with all the soft interface information
   * @seq: neighbour table seq_file struct
   */
@@@ -215,7 -216,7 +216,7 @@@ static void batadv_v_neigh_print(struc
  #endif
  
  /**
-  * batadv_v_neigh_dump_neigh - Dump a neighbour into a message
+  * batadv_v_neigh_dump_neigh() - Dump a neighbour into a message
   * @msg: Netlink message to dump into
   * @portid: Port making netlink request
   * @seq: Sequence number of netlink message
@@@ -258,7 -259,7 +259,7 @@@ batadv_v_neigh_dump_neigh(struct sk_buf
  }
  
  /**
-  * batadv_v_neigh_dump_hardif - Dump the  neighbours of a hard interface  into
+  * batadv_v_neigh_dump_hardif() - Dump the  neighbours of a hard interface into
   *  a message
   * @msg: Netlink message to dump into
   * @portid: Port making netlink request
@@@ -296,7 -297,7 +297,7 @@@ batadv_v_neigh_dump_hardif(struct sk_bu
  }
  
  /**
-  * batadv_v_neigh_dump - Dump the neighbours of a hard interface  into a
+  * batadv_v_neigh_dump() - Dump the neighbours of a hard interface  into a
   *  message
   * @msg: Netlink message to dump into
   * @cb: Control block containing additional options
@@@ -348,7 -349,7 +349,7 @@@ batadv_v_neigh_dump(struct sk_buff *msg
  
  #ifdef CONFIG_BATMAN_ADV_DEBUGFS
  /**
-  * batadv_v_orig_print - print the originator table
+  * batadv_v_orig_print() - print the originator table
   * @bat_priv: the bat priv with all the soft interface information
   * @seq: debugfs table seq_file struct
   * @if_outgoing: the outgoing interface for which this should be printed
@@@ -416,8 -417,7 +417,7 @@@ next
  #endif
  
  /**
-  * batadv_v_orig_dump_subentry - Dump an originator subentry into a
-  *  message
+  * batadv_v_orig_dump_subentry() - Dump an originator subentry into a message
   * @msg: Netlink message to dump into
   * @portid: Port making netlink request
   * @seq: Sequence number of netlink message
@@@ -483,7 -483,7 +483,7 @@@ batadv_v_orig_dump_subentry(struct sk_b
  }
  
  /**
-  * batadv_v_orig_dump_entry - Dump an originator entry into a message
+  * batadv_v_orig_dump_entry() - Dump an originator entry into a message
   * @msg: Netlink message to dump into
   * @portid: Port making netlink request
   * @seq: Sequence number of netlink message
@@@ -536,8 -536,7 +536,7 @@@ batadv_v_orig_dump_entry(struct sk_buf
  }
  
  /**
-  * batadv_v_orig_dump_bucket - Dump an originator bucket into a
-  *  message
+  * batadv_v_orig_dump_bucket() - Dump an originator bucket into a message
   * @msg: Netlink message to dump into
   * @portid: Port making netlink request
   * @seq: Sequence number of netlink message
@@@ -578,7 -577,7 +577,7 @@@ batadv_v_orig_dump_bucket(struct sk_buf
  }
  
  /**
-  * batadv_v_orig_dump - Dump the originators into a message
+  * batadv_v_orig_dump() - Dump the originators into a message
   * @msg: Netlink message to dump into
   * @cb: Control block containing additional options
   * @bat_priv: The bat priv with all the soft interface information
@@@ -668,7 -667,7 +667,7 @@@ err_ifinfo1
  }
  
  /**
-  * batadv_v_init_sel_class - initialize GW selection class
+  * batadv_v_init_sel_class() - initialize GW selection class
   * @bat_priv: the bat priv with all the soft interface information
   */
  static void batadv_v_init_sel_class(struct batadv_priv *bat_priv)
@@@ -704,7 -703,7 +703,7 @@@ static ssize_t batadv_v_show_sel_class(
  }
  
  /**
-  * batadv_v_gw_throughput_get - retrieve the GW-bandwidth for a given GW
+  * batadv_v_gw_throughput_get() - retrieve the GW-bandwidth for a given GW
   * @gw_node: the GW to retrieve the metric for
   * @bw: the pointer where the metric will be stored. The metric is computed as
   *  the minimum between the GW advertised throughput and the path throughput to
@@@ -747,7 -746,7 +746,7 @@@ out
  }
  
  /**
-  * batadv_v_gw_get_best_gw_node - retrieve the best GW node
+  * batadv_v_gw_get_best_gw_node() - retrieve the best GW node
   * @bat_priv: the bat priv with all the soft interface information
   *
   * Return: the GW node having the best GW-metric, NULL if no GW is known
@@@ -785,7 -784,7 +784,7 @@@ next
  }
  
  /**
-  * batadv_v_gw_is_eligible - check if a originator would be selected as GW
+  * batadv_v_gw_is_eligible() - check if a originator would be selected as GW
   * @bat_priv: the bat priv with all the soft interface information
   * @curr_gw_orig: originator representing the currently selected GW
   * @orig_node: the originator representing the new candidate
@@@ -814,7 -813,7 +813,7 @@@ static bool batadv_v_gw_is_eligible(str
  	}
  
  	orig_gw = batadv_gw_node_get(bat_priv, orig_node);
 -	if (!orig_node)
 +	if (!orig_gw)
  		goto out;
  
  	if (batadv_v_gw_throughput_get(orig_gw, &orig_throughput) < 0)
@@@ -884,7 -883,7 +883,7 @@@ out
  }
  
  /**
-  * batadv_v_gw_print - print the gateway list
+  * batadv_v_gw_print() - print the gateway list
   * @bat_priv: the bat priv with all the soft interface information
   * @seq: gateway table seq_file struct
   */
@@@ -913,7 -912,7 +912,7 @@@ static void batadv_v_gw_print(struct ba
  #endif
  
  /**
-  * batadv_v_gw_dump_entry - Dump a gateway into a message
+  * batadv_v_gw_dump_entry() - Dump a gateway into a message
   * @msg: Netlink message to dump into
   * @portid: Port making netlink request
   * @seq: Sequence number of netlink message
@@@ -1004,7 -1003,7 +1003,7 @@@ out
  }
  
  /**
-  * batadv_v_gw_dump - Dump gateways into a message
+  * batadv_v_gw_dump() - Dump gateways into a message
   * @msg: Netlink message to dump into
   * @cb: Control block containing additional options
   * @bat_priv: The bat priv with all the soft interface information
@@@ -1074,7 -1073,7 +1073,7 @@@ static struct batadv_algo_ops batadv_ba
  };
  
  /**
-  * batadv_v_hardif_init - initialize the algorithm specific fields in the
+  * batadv_v_hardif_init() - initialize the algorithm specific fields in the
   *  hard-interface object
   * @hard_iface: the hard-interface to initialize
   */
@@@ -1088,7 -1087,7 +1087,7 @@@ void batadv_v_hardif_init(struct batadv
  }
  
  /**
-  * batadv_v_mesh_init - initialize the B.A.T.M.A.N. V private resources for a
+  * batadv_v_mesh_init() - initialize the B.A.T.M.A.N. V private resources for a
   *  mesh
   * @bat_priv: the object representing the mesh interface to initialise
   *
@@@ -1106,7 -1105,7 +1105,7 @@@ int batadv_v_mesh_init(struct batadv_pr
  }
  
  /**
-  * batadv_v_mesh_free - free the B.A.T.M.A.N. V private resources for a mesh
+  * batadv_v_mesh_free() - free the B.A.T.M.A.N. V private resources for a mesh
   * @bat_priv: the object representing the mesh interface to free
   */
  void batadv_v_mesh_free(struct batadv_priv *bat_priv)
@@@ -1115,7 -1114,7 +1114,7 @@@
  }
  
  /**
-  * batadv_v_init - B.A.T.M.A.N. V initialization function
+  * batadv_v_init() - B.A.T.M.A.N. V initialization function
   *
   * Description: Takes care of initializing all the subcomponents.
   * It is invoked upon module load only.
diff --combined net/batman-adv/fragmentation.c
index ebe6e38934e4,36f8a84153bf..4979350af9a7
--- a/net/batman-adv/fragmentation.c
+++ b/net/batman-adv/fragmentation.c
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0
  /* Copyright (C) 2013-2017  B.A.T.M.A.N. contributors:
   *
   * Martin Hundebøll <martin at hundeboll.net>
@@@ -22,7 -23,7 +23,7 @@@
  #include <linux/byteorder/generic.h>
  #include <linux/errno.h>
  #include <linux/etherdevice.h>
- #include <linux/fs.h>
+ #include <linux/gfp.h>
  #include <linux/if_ether.h>
  #include <linux/jiffies.h>
  #include <linux/kernel.h>
@@@ -41,7 -42,7 +42,7 @@@
  #include "soft-interface.h"
  
  /**
-  * batadv_frag_clear_chain - delete entries in the fragment buffer chain
+  * batadv_frag_clear_chain() - delete entries in the fragment buffer chain
   * @head: head of chain with entries.
   * @dropped: whether the chain is cleared because all fragments are dropped
   *
@@@ -65,7 -66,7 +66,7 @@@ static void batadv_frag_clear_chain(str
  }
  
  /**
-  * batadv_frag_purge_orig - free fragments associated to an orig
+  * batadv_frag_purge_orig() - free fragments associated to an orig
   * @orig_node: originator to free fragments from
   * @check_cb: optional function to tell if an entry should be purged
   */
@@@ -89,7 -90,7 +90,7 @@@ void batadv_frag_purge_orig(struct bata
  }
  
  /**
-  * batadv_frag_size_limit - maximum possible size of packet to be fragmented
+  * batadv_frag_size_limit() - maximum possible size of packet to be fragmented
   *
   * Return: the maximum size of payload that can be fragmented.
   */
@@@ -104,7 -105,7 +105,7 @@@ static int batadv_frag_size_limit(void
  }
  
  /**
-  * batadv_frag_init_chain - check and prepare fragment chain for new fragment
+  * batadv_frag_init_chain() - check and prepare fragment chain for new fragment
   * @chain: chain in fragments table to init
   * @seqno: sequence number of the received fragment
   *
@@@ -134,7 -135,7 +135,7 @@@ static bool batadv_frag_init_chain(stru
  }
  
  /**
-  * batadv_frag_insert_packet - insert a fragment into a fragment chain
+  * batadv_frag_insert_packet() - insert a fragment into a fragment chain
   * @orig_node: originator that the fragment was received from
   * @skb: skb to insert
   * @chain_out: list head to attach complete chains of fragments to
@@@ -248,7 -249,7 +249,7 @@@ err
  }
  
  /**
-  * batadv_frag_merge_packets - merge a chain of fragments
+  * batadv_frag_merge_packets() - merge a chain of fragments
   * @chain: head of chain with fragments
   *
   * Expand the first skb in the chain and copy the content of the remaining
@@@ -306,7 -307,7 +307,7 @@@ free
  }
  
  /**
-  * batadv_frag_skb_buffer - buffer fragment for later merge
+  * batadv_frag_skb_buffer() - buffer fragment for later merge
   * @skb: skb to buffer
   * @orig_node_src: originator that the skb is received from
   *
@@@ -346,7 -347,7 +347,7 @@@ out_err
  }
  
  /**
-  * batadv_frag_skb_fwd - forward fragments that would exceed MTU when merged
+  * batadv_frag_skb_fwd() - forward fragments that would exceed MTU when merged
   * @skb: skb to forward
   * @recv_if: interface that the skb is received on
   * @orig_node_src: originator that the skb is received from
@@@ -400,7 -401,7 +401,7 @@@ out
  }
  
  /**
-  * batadv_frag_create - create a fragment from skb
+  * batadv_frag_create() - create a fragment from skb
   * @skb: skb to create fragment from
   * @frag_head: header to use in new fragment
   * @fragment_size: size of new fragment
@@@ -438,7 -439,7 +439,7 @@@ err
  }
  
  /**
-  * batadv_frag_send_packet - create up to 16 fragments from the passed skb
+  * batadv_frag_send_packet() - create up to 16 fragments from the passed skb
   * @skb: skb to create fragments from
   * @orig_node: final destination of the created fragments
   * @neigh_node: next-hop of the created fragments
@@@ -499,8 -500,6 +500,8 @@@ int batadv_frag_send_packet(struct sk_b
  	 */
  	if (skb->priority >= 256 && skb->priority <= 263)
  		frag_header.priority = skb->priority - 256;
 +	else
 +		frag_header.priority = 0;
  
  	ether_addr_copy(frag_header.orig, primary_if->net_dev->dev_addr);
  	ether_addr_copy(frag_header.dest, orig_node->orig);
diff --combined net/batman-adv/tp_meter.c
index ebc4e2241c77,b443b9d28918..7dcf2aa4deb5
--- a/net/batman-adv/tp_meter.c
+++ b/net/batman-adv/tp_meter.c
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0
  /* Copyright (C) 2012-2017  B.A.T.M.A.N. contributors:
   *
   * Edo Monticelli, Antonio Quartulli
@@@ -19,13 -20,13 +20,13 @@@
  #include "main.h"
  
  #include <linux/atomic.h>
- #include <linux/bug.h>
+ #include <linux/build_bug.h>
  #include <linux/byteorder/generic.h>
  #include <linux/cache.h>
  #include <linux/compiler.h>
  #include <linux/err.h>
  #include <linux/etherdevice.h>
- #include <linux/fs.h>
+ #include <linux/gfp.h>
  #include <linux/if_ether.h>
  #include <linux/init.h>
  #include <linux/jiffies.h>
@@@ -97,7 -98,7 +98,7 @@@
  static u8 batadv_tp_prerandom[4096] __read_mostly;
  
  /**
-  * batadv_tp_session_cookie - generate session cookie based on session ids
+  * batadv_tp_session_cookie() - generate session cookie based on session ids
   * @session: TP session identifier
   * @icmp_uid: icmp pseudo uid of the tp session
   *
@@@ -115,7 -116,7 +116,7 @@@ static u32 batadv_tp_session_cookie(con
  }
  
  /**
-  * batadv_tp_cwnd - compute the new cwnd size
+  * batadv_tp_cwnd() - compute the new cwnd size
   * @base: base cwnd size value
   * @increment: the value to add to base to get the new size
   * @min: minumim cwnd value (usually MSS)
@@@ -140,7 -141,7 +141,7 @@@ static u32 batadv_tp_cwnd(u32 base, u3
  }
  
  /**
-  * batadv_tp_updated_cwnd - update the Congestion Windows
+  * batadv_tp_updated_cwnd() - update the Congestion Windows
   * @tp_vars: the private data of the current TP meter session
   * @mss: maximum segment size of transmission
   *
@@@ -176,7 -177,7 +177,7 @@@ static void batadv_tp_update_cwnd(struc
  }
  
  /**
-  * batadv_tp_update_rto - calculate new retransmission timeout
+  * batadv_tp_update_rto() - calculate new retransmission timeout
   * @tp_vars: the private data of the current TP meter session
   * @new_rtt: new roundtrip time in msec
   */
@@@ -212,7 -213,7 +213,7 @@@ static void batadv_tp_update_rto(struc
  }
  
  /**
-  * batadv_tp_batctl_notify - send client status result to client
+  * batadv_tp_batctl_notify() - send client status result to client
   * @reason: reason for tp meter session stop
   * @dst: destination of tp_meter session
   * @bat_priv: the bat priv with all the soft interface information
@@@ -244,7 -245,7 +245,7 @@@ static void batadv_tp_batctl_notify(enu
  }
  
  /**
-  * batadv_tp_batctl_error_notify - send client error result to client
+  * batadv_tp_batctl_error_notify() - send client error result to client
   * @reason: reason for tp meter session stop
   * @dst: destination of tp_meter session
   * @bat_priv: the bat priv with all the soft interface information
@@@ -259,7 -260,7 +260,7 @@@ static void batadv_tp_batctl_error_noti
  }
  
  /**
-  * batadv_tp_list_find - find a tp_vars object in the global list
+  * batadv_tp_list_find() - find a tp_vars object in the global list
   * @bat_priv: the bat priv with all the soft interface information
   * @dst: the other endpoint MAC address to look for
   *
@@@ -294,7 -295,8 +295,8 @@@ static struct batadv_tp_vars *batadv_tp
  }
  
  /**
-  * batadv_tp_list_find_session - find tp_vars session object in the global list
+  * batadv_tp_list_find_session() - find tp_vars session object in the global
+  *  list
   * @bat_priv: the bat priv with all the soft interface information
   * @dst: the other endpoint MAC address to look for
   * @session: session identifier
@@@ -335,7 -337,7 +337,7 @@@ batadv_tp_list_find_session(struct bata
  }
  
  /**
-  * batadv_tp_vars_release - release batadv_tp_vars from lists and queue for
+  * batadv_tp_vars_release() - release batadv_tp_vars from lists and queue for
   *  free after rcu grace period
   * @ref: kref pointer of the batadv_tp_vars
   */
@@@ -360,7 -362,7 +362,7 @@@ static void batadv_tp_vars_release(stru
  }
  
  /**
-  * batadv_tp_vars_put - decrement the batadv_tp_vars refcounter and possibly
+  * batadv_tp_vars_put() - decrement the batadv_tp_vars refcounter and possibly
   *  release it
   * @tp_vars: the private data of the current TP meter session to be free'd
   */
@@@ -370,7 -372,7 +372,7 @@@ static void batadv_tp_vars_put(struct b
  }
  
  /**
-  * batadv_tp_sender_cleanup - cleanup sender data and drop and timer
+  * batadv_tp_sender_cleanup() - cleanup sender data and drop and timer
   * @bat_priv: the bat priv with all the soft interface information
   * @tp_vars: the private data of the current TP meter session to cleanup
   */
@@@ -400,7 -402,7 +402,7 @@@ static void batadv_tp_sender_cleanup(st
  }
  
  /**
-  * batadv_tp_sender_end - print info about ended session and inform client
+  * batadv_tp_sender_end() - print info about ended session and inform client
   * @bat_priv: the bat priv with all the soft interface information
   * @tp_vars: the private data of the current TP meter session
   */
@@@ -433,7 -435,7 +435,7 @@@ static void batadv_tp_sender_end(struc
  }
  
  /**
-  * batadv_tp_sender_shutdown - let sender thread/timer stop gracefully
+  * batadv_tp_sender_shutdown() - let sender thread/timer stop gracefully
   * @tp_vars: the private data of the current TP meter session
   * @reason: reason for tp meter session stop
   */
@@@ -447,7 -449,7 +449,7 @@@ static void batadv_tp_sender_shutdown(s
  }
  
  /**
-  * batadv_tp_sender_finish - stop sender session after test_length was reached
+  * batadv_tp_sender_finish() - stop sender session after test_length was reached
   * @work: delayed work reference of the related tp_vars
   */
  static void batadv_tp_sender_finish(struct work_struct *work)
@@@ -463,7 -465,7 +465,7 @@@
  }
  
  /**
-  * batadv_tp_reset_sender_timer - reschedule the sender timer
+  * batadv_tp_reset_sender_timer() - reschedule the sender timer
   * @tp_vars: the private TP meter data for this session
   *
   * Reschedule the timer using tp_vars->rto as delay
@@@ -481,8 -483,8 +483,8 @@@ static void batadv_tp_reset_sender_time
  }
  
  /**
-  * batadv_tp_sender_timeout - timer that fires in case of packet loss
+  * batadv_tp_sender_timeout() - timer that fires in case of packet loss
 - * @arg: address of the related tp_vars
 + * @t: address to timer_list inside tp_vars
   *
   * If fired it means that there was packet loss.
   * Switch to Slow Start, set the ss_threshold to half of the current cwnd and
@@@ -531,7 -533,7 +533,7 @@@ static void batadv_tp_sender_timeout(st
  }
  
  /**
-  * batadv_tp_fill_prerandom - Fill buffer with prefetched random bytes
+  * batadv_tp_fill_prerandom() - Fill buffer with prefetched random bytes
   * @tp_vars: the private TP meter data for this session
   * @buf: Buffer to fill with bytes
   * @nbytes: amount of pseudorandom bytes
@@@ -563,7 -565,7 +565,7 @@@ static void batadv_tp_fill_prerandom(st
  }
  
  /**
-  * batadv_tp_send_msg - send a single message
+  * batadv_tp_send_msg() - send a single message
   * @tp_vars: the private TP meter data for this session
   * @src: source mac address
   * @orig_node: the originator of the destination
@@@ -623,7 -625,7 +625,7 @@@ static int batadv_tp_send_msg(struct ba
  }
  
  /**
-  * batadv_tp_recv_ack - ACK receiving function
+  * batadv_tp_recv_ack() - ACK receiving function
   * @bat_priv: the bat priv with all the soft interface information
   * @skb: the buffer containing the received packet
   *
@@@ -765,7 -767,7 +767,7 @@@ out
  }
  
  /**
-  * batadv_tp_avail - check if congestion window is not full
+  * batadv_tp_avail() - check if congestion window is not full
   * @tp_vars: the private data of the current TP meter session
   * @payload_len: size of the payload of a single message
   *
@@@ -783,7 -785,7 +785,7 @@@ static bool batadv_tp_avail(struct bata
  }
  
  /**
-  * batadv_tp_wait_available - wait until congestion window becomes free or
+  * batadv_tp_wait_available() - wait until congestion window becomes free or
   *  timeout is reached
   * @tp_vars: the private data of the current TP meter session
   * @plen: size of the payload of a single message
@@@ -805,7 -807,7 +807,7 @@@ static int batadv_tp_wait_available(str
  }
  
  /**
-  * batadv_tp_send - main sending thread of a tp meter session
+  * batadv_tp_send() - main sending thread of a tp meter session
   * @arg: address of the related tp_vars
   *
   * Return: nothing, this function never returns
@@@ -904,7 -906,8 +906,8 @@@ out
  }
  
  /**
-  * batadv_tp_start_kthread - start new thread which manages the tp meter sender
+  * batadv_tp_start_kthread() - start new thread which manages the tp meter
+  *  sender
   * @tp_vars: the private data of the current TP meter session
   */
  static void batadv_tp_start_kthread(struct batadv_tp_vars *tp_vars)
@@@ -935,7 -938,7 +938,7 @@@
  }
  
  /**
-  * batadv_tp_start - start a new tp meter session
+  * batadv_tp_start() - start a new tp meter session
   * @bat_priv: the bat priv with all the soft interface information
   * @dst: the receiver MAC address
   * @test_length: test length in milliseconds
@@@ -1060,7 -1063,7 +1063,7 @@@ void batadv_tp_start(struct batadv_pri
  }
  
  /**
-  * batadv_tp_stop - stop currently running tp meter session
+  * batadv_tp_stop() - stop currently running tp meter session
   * @bat_priv: the bat priv with all the soft interface information
   * @dst: the receiver MAC address
   * @return_value: reason for tp meter session stop
@@@ -1092,7 -1095,7 +1095,7 @@@ out
  }
  
  /**
-  * batadv_tp_reset_receiver_timer - reset the receiver shutdown timer
+  * batadv_tp_reset_receiver_timer() - reset the receiver shutdown timer
   * @tp_vars: the private data of the current TP meter session
   *
   * start the receiver shutdown timer or reset it if already started
@@@ -1104,9 -1107,9 +1107,9 @@@ static void batadv_tp_reset_receiver_ti
  }
  
  /**
-  * batadv_tp_receiver_shutdown - stop a tp meter receiver when timeout is
+  * batadv_tp_receiver_shutdown() - stop a tp meter receiver when timeout is
   *  reached without received ack
 - * @arg: address of the related tp_vars
 + * @t: address to timer_list inside tp_vars
   */
  static void batadv_tp_receiver_shutdown(struct timer_list *t)
  {
@@@ -1149,7 -1152,7 +1152,7 @@@
  }
  
  /**
-  * batadv_tp_send_ack - send an ACK packet
+  * batadv_tp_send_ack() - send an ACK packet
   * @bat_priv: the bat priv with all the soft interface information
   * @dst: the mac address of the destination originator
   * @seq: the sequence number to ACK
@@@ -1221,7 -1224,7 +1224,7 @@@ out
  }
  
  /**
-  * batadv_tp_handle_out_of_order - store an out of order packet
+  * batadv_tp_handle_out_of_order() - store an out of order packet
   * @tp_vars: the private data of the current TP meter session
   * @skb: the buffer containing the received packet
   *
@@@ -1297,7 -1300,7 +1300,7 @@@ out
  }
  
  /**
-  * batadv_tp_ack_unordered - update number received bytes in current stream
+  * batadv_tp_ack_unordered() - update number received bytes in current stream
   *  without gaps
   * @tp_vars: the private data of the current TP meter session
   */
@@@ -1330,7 -1333,7 +1333,7 @@@ static void batadv_tp_ack_unordered(str
  }
  
  /**
-  * batadv_tp_init_recv - return matching or create new receiver tp_vars
+  * batadv_tp_init_recv() - return matching or create new receiver tp_vars
   * @bat_priv: the bat priv with all the soft interface information
   * @icmp: received icmp tp msg
   *
@@@ -1383,7 -1386,7 +1386,7 @@@ out_unlock
  }
  
  /**
-  * batadv_tp_recv_msg - process a single data message
+  * batadv_tp_recv_msg() - process a single data message
   * @bat_priv: the bat priv with all the soft interface information
   * @skb: the buffer containing the received packet
   *
@@@ -1468,7 -1471,7 +1471,7 @@@ out
  }
  
  /**
-  * batadv_tp_meter_recv - main TP Meter receiving function
+  * batadv_tp_meter_recv() - main TP Meter receiving function
   * @bat_priv: the bat priv with all the soft interface information
   * @skb: the buffer containing the received packet
   */
@@@ -1494,7 -1497,7 +1497,7 @@@ void batadv_tp_meter_recv(struct batadv
  }
  
  /**
-  * batadv_tp_meter_init - initialize global tp_meter structures
+  * batadv_tp_meter_init() - initialize global tp_meter structures
   */
  void __init batadv_tp_meter_init(void)
  {

-- 
LinuxNextTracking


More information about the linux-merge mailing list