Skip to content

Commit

Permalink
batman-adv: Use parentheses in function kernel-doc
Browse files Browse the repository at this point in the history
The documentation describing kernel-doc comments for functions ("How to
format kernel-doc comments") uses parentheses at the end of the function
name. Using this format allows to use a consistent style when adding
documentation to a function and when referencing this function in a
different kernel-doc section.

Signed-off-by: Sven Eckelmann <[email protected]>
Signed-off-by: Simon Wunderlich <[email protected]>
  • Loading branch information
ecsv authored and simonwunderlich committed Dec 15, 2017
1 parent 6a3038f commit 7e9a8c2
Show file tree
Hide file tree
Showing 34 changed files with 633 additions and 619 deletions.
7 changes: 4 additions & 3 deletions net/batman-adv/bat_algo.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ char batadv_routing_algo[20] = "BATMAN_IV";
static struct hlist_head batadv_algo_list;

/**
* batadv_algo_init - Initialize batman-adv algorithm management data structures
* batadv_algo_init() - Initialize batman-adv algorithm management data
* structures
*/
void batadv_algo_init(void)
{
Expand Down Expand Up @@ -149,7 +150,7 @@ module_param_cb(routing_algo, &batadv_param_ops_ra, &batadv_param_string_ra,
0644);

/**
* batadv_algo_dump_entry - fill in information about one supported routing
* batadv_algo_dump_entry() - fill in information about one supported routing
* algorithm
* @msg: netlink message to be sent back
* @portid: Port to reply to
Expand Down Expand Up @@ -180,7 +181,7 @@ static int batadv_algo_dump_entry(struct sk_buff *msg, u32 portid, u32 seq,
}

/**
* batadv_algo_dump - fill in information about supported routing
* batadv_algo_dump() - fill in information about supported routing
* algorithms
* @msg: netlink message to be sent back
* @cb: Parameters to the netlink request
Expand Down
80 changes: 41 additions & 39 deletions net/batman-adv/bat_iv_ogm.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ enum batadv_dup_status {
};

/**
* 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
Expand All @@ -99,7 +99,7 @@ static void batadv_ring_buffer_set(u8 lq_recv[], u8 *lq_index, u8 value)
}

/**
* 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
*
Expand Down Expand Up @@ -131,7 +131,7 @@ static u8 batadv_ring_buffer_avg(const u8 lq_recv[])
}

/**
* 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
*/
Expand All @@ -142,8 +142,8 @@ static void batadv_iv_ogm_orig_free(struct batadv_orig_node *orig_node)
}

/**
* 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
*
Expand Down Expand Up @@ -187,7 +187,7 @@ static int batadv_iv_ogm_orig_add_if(struct batadv_orig_node *orig_node,
}

/**
* 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
Expand Down Expand Up @@ -225,7 +225,7 @@ batadv_iv_ogm_drop_bcast_own_entry(struct batadv_orig_node *orig_node,
}

/**
* 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
Expand Down Expand Up @@ -260,8 +260,8 @@ batadv_iv_ogm_drop_bcast_own_sum_entry(struct batadv_orig_node *orig_node,
}

/**
* 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
Expand Down Expand Up @@ -291,7 +291,8 @@ static int batadv_iv_ogm_orig_del_if(struct batadv_orig_node *orig_node,
}

/**
* 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
*
Expand Down Expand Up @@ -448,7 +449,7 @@ static u8 batadv_hop_penalty(u8 tq, const struct batadv_priv *bat_priv)
}

/**
* 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
Expand Down Expand Up @@ -558,7 +559,7 @@ static void batadv_iv_ogm_emit(struct batadv_forw_packet *forw_packet)
}

/**
* 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
Expand Down Expand Up @@ -661,7 +662,7 @@ batadv_iv_ogm_can_aggregate(const struct batadv_ogm_packet *new_bat_ogm_packet,
}

/**
* 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
Expand Down Expand Up @@ -744,7 +745,7 @@ static void batadv_iv_ogm_aggregate(struct batadv_forw_packet *forw_packet_aggr,
}

/**
* 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
Expand Down Expand Up @@ -870,8 +871,8 @@ static void batadv_iv_ogm_forward(struct batadv_orig_node *orig_node,
}

/**
* 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
Expand Down Expand Up @@ -988,7 +989,7 @@ static void batadv_iv_ogm_schedule(struct batadv_hard_iface *hard_iface)
}

/**
* 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
Expand Down Expand Up @@ -1153,7 +1154,7 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv,
}

/**
* 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
Expand Down Expand Up @@ -1299,7 +1300,7 @@ static bool batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
}

/**
* 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
Expand Down Expand Up @@ -1402,7 +1403,8 @@ batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
}

/**
* 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
Expand Down Expand Up @@ -1609,7 +1611,7 @@ batadv_iv_ogm_process_per_outif(const struct sk_buff *skb, int ogm_offset,
}

/**
* 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
Expand Down Expand Up @@ -1862,7 +1864,7 @@ static int batadv_iv_ogm_receive(struct sk_buff *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
Expand Down Expand Up @@ -1891,7 +1893,7 @@ batadv_iv_ogm_orig_print_neigh(struct batadv_orig_node *orig_node,
}

/**
* 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
Expand Down Expand Up @@ -1961,7 +1963,7 @@ static void batadv_iv_ogm_orig_print(struct batadv_priv *bat_priv,
#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
Expand All @@ -1987,7 +1989,7 @@ batadv_iv_ogm_neigh_get_tq_avg(struct batadv_neigh_node *neigh_node,
}

/**
* 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
Expand Down Expand Up @@ -2049,7 +2051,7 @@ batadv_iv_ogm_orig_dump_subentry(struct sk_buff *msg, u32 portid, u32 seq,
}

/**
* 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
Expand Down Expand Up @@ -2111,7 +2113,7 @@ batadv_iv_ogm_orig_dump_entry(struct sk_buff *msg, u32 portid, u32 seq,
}

/**
* 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
Expand Down Expand Up @@ -2154,7 +2156,7 @@ batadv_iv_ogm_orig_dump_bucket(struct sk_buff *msg, u32 portid, u32 seq,
}

/**
* 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
Expand Down Expand Up @@ -2191,7 +2193,7 @@ batadv_iv_ogm_orig_dump(struct sk_buff *msg, struct netlink_callback *cb,

#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
*/
Expand All @@ -2210,7 +2212,7 @@ batadv_iv_hardif_neigh_print(struct seq_file *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
*/
Expand Down Expand Up @@ -2243,7 +2245,7 @@ static void batadv_iv_neigh_print(struct batadv_priv *bat_priv,
#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
Expand Down Expand Up @@ -2288,7 +2290,7 @@ static bool batadv_iv_ogm_neigh_diff(struct batadv_neigh_node *neigh1,
}

/**
* 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
Expand Down Expand Up @@ -2327,7 +2329,7 @@ batadv_iv_ogm_neigh_dump_neigh(struct sk_buff *msg, u32 portid, u32 seq,
}

/**
* 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
Expand Down Expand Up @@ -2366,7 +2368,7 @@ batadv_iv_ogm_neigh_dump_hardif(struct sk_buff *msg, u32 portid, u32 seq,
}

/**
* 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
Expand Down Expand Up @@ -2418,7 +2420,7 @@ batadv_iv_ogm_neigh_dump(struct sk_buff *msg, struct netlink_callback *cb,
}

/**
* 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
Expand All @@ -2444,7 +2446,7 @@ static int batadv_iv_ogm_neigh_cmp(struct batadv_neigh_node *neigh1,
}

/**
* 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
Expand Down Expand Up @@ -2479,7 +2481,7 @@ static void batadv_iv_iface_activate(struct batadv_hard_iface *hard_iface)
}

/**
* 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)
Expand Down Expand Up @@ -2704,7 +2706,7 @@ static void batadv_iv_gw_print(struct batadv_priv *bat_priv,
#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
Expand Down Expand Up @@ -2775,7 +2777,7 @@ static int batadv_iv_gw_dump_entry(struct sk_buff *msg, u32 portid, u32 seq,
}

/**
* 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
Expand Down
Loading

0 comments on commit 7e9a8c2

Please sign in to comment.