Skip to content

Commit 7e9a8c2

Browse files
ecsvsimonwunderlich
authored andcommitted
batman-adv: Use parentheses in function kernel-doc
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 <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
1 parent 6a3038f commit 7e9a8c2

34 files changed

+633
-619
lines changed

net/batman-adv/bat_algo.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ char batadv_routing_algo[20] = "BATMAN_IV";
3838
static struct hlist_head batadv_algo_list;
3939

4040
/**
41-
* batadv_algo_init - Initialize batman-adv algorithm management data structures
41+
* batadv_algo_init() - Initialize batman-adv algorithm management data
42+
* structures
4243
*/
4344
void batadv_algo_init(void)
4445
{
@@ -149,7 +150,7 @@ module_param_cb(routing_algo, &batadv_param_ops_ra, &batadv_param_string_ra,
149150
0644);
150151

151152
/**
152-
* batadv_algo_dump_entry - fill in information about one supported routing
153+
* batadv_algo_dump_entry() - fill in information about one supported routing
153154
* algorithm
154155
* @msg: netlink message to be sent back
155156
* @portid: Port to reply to
@@ -180,7 +181,7 @@ static int batadv_algo_dump_entry(struct sk_buff *msg, u32 portid, u32 seq,
180181
}
181182

182183
/**
183-
* batadv_algo_dump - fill in information about supported routing
184+
* batadv_algo_dump() - fill in information about supported routing
184185
* algorithms
185186
* @msg: netlink message to be sent back
186187
* @cb: Parameters to the netlink request

net/batman-adv/bat_iv_ogm.c

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ enum batadv_dup_status {
8787
};
8888

8989
/**
90-
* batadv_ring_buffer_set - update the ring buffer with the given value
90+
* batadv_ring_buffer_set() - update the ring buffer with the given value
9191
* @lq_recv: pointer to the ring buffer
9292
* @lq_index: index to store the value at
9393
* @value: value to store in the ring buffer
@@ -99,7 +99,7 @@ static void batadv_ring_buffer_set(u8 lq_recv[], u8 *lq_index, u8 value)
9999
}
100100

101101
/**
102-
* batadv_ring_buffer_avg - compute the average of all non-zero values stored
102+
* batadv_ring_buffer_avg() - compute the average of all non-zero values stored
103103
* in the given ring buffer
104104
* @lq_recv: pointer to the ring buffer
105105
*
@@ -131,7 +131,7 @@ static u8 batadv_ring_buffer_avg(const u8 lq_recv[])
131131
}
132132

133133
/**
134-
* batadv_iv_ogm_orig_free - free the private resources allocated for this
134+
* batadv_iv_ogm_orig_free() - free the private resources allocated for this
135135
* orig_node
136136
* @orig_node: the orig_node for which the resources have to be free'd
137137
*/
@@ -142,8 +142,8 @@ static void batadv_iv_ogm_orig_free(struct batadv_orig_node *orig_node)
142142
}
143143

144144
/**
145-
* batadv_iv_ogm_orig_add_if - change the private structures of the orig_node to
146-
* include the new hard-interface
145+
* batadv_iv_ogm_orig_add_if() - change the private structures of the orig_node
146+
* to include the new hard-interface
147147
* @orig_node: the orig_node that has to be changed
148148
* @max_if_num: the current amount of interfaces
149149
*
@@ -187,7 +187,7 @@ static int batadv_iv_ogm_orig_add_if(struct batadv_orig_node *orig_node,
187187
}
188188

189189
/**
190-
* batadv_iv_ogm_drop_bcast_own_entry - drop section of bcast_own
190+
* batadv_iv_ogm_drop_bcast_own_entry() - drop section of bcast_own
191191
* @orig_node: the orig_node that has to be changed
192192
* @max_if_num: the current amount of interfaces
193193
* @del_if_num: the index of the interface being removed
@@ -225,7 +225,7 @@ batadv_iv_ogm_drop_bcast_own_entry(struct batadv_orig_node *orig_node,
225225
}
226226

227227
/**
228-
* batadv_iv_ogm_drop_bcast_own_sum_entry - drop section of bcast_own_sum
228+
* batadv_iv_ogm_drop_bcast_own_sum_entry() - drop section of bcast_own_sum
229229
* @orig_node: the orig_node that has to be changed
230230
* @max_if_num: the current amount of interfaces
231231
* @del_if_num: the index of the interface being removed
@@ -260,8 +260,8 @@ batadv_iv_ogm_drop_bcast_own_sum_entry(struct batadv_orig_node *orig_node,
260260
}
261261

262262
/**
263-
* batadv_iv_ogm_orig_del_if - change the private structures of the orig_node to
264-
* exclude the removed interface
263+
* batadv_iv_ogm_orig_del_if() - change the private structures of the orig_node
264+
* to exclude the removed interface
265265
* @orig_node: the orig_node that has to be changed
266266
* @max_if_num: the current amount of interfaces
267267
* @del_if_num: the index of the interface being removed
@@ -291,7 +291,8 @@ static int batadv_iv_ogm_orig_del_if(struct batadv_orig_node *orig_node,
291291
}
292292

293293
/**
294-
* batadv_iv_ogm_orig_get - retrieve or create (if does not exist) an originator
294+
* batadv_iv_ogm_orig_get() - retrieve or create (if does not exist) an
295+
* originator
295296
* @bat_priv: the bat priv with all the soft interface information
296297
* @addr: mac address of the originator
297298
*
@@ -448,7 +449,7 @@ static u8 batadv_hop_penalty(u8 tq, const struct batadv_priv *bat_priv)
448449
}
449450

450451
/**
451-
* batadv_iv_ogm_aggr_packet - checks if there is another OGM attached
452+
* batadv_iv_ogm_aggr_packet() - checks if there is another OGM attached
452453
* @buff_pos: current position in the skb
453454
* @packet_len: total length of the skb
454455
* @tvlv_len: tvlv length of the previously considered OGM
@@ -558,7 +559,7 @@ static void batadv_iv_ogm_emit(struct batadv_forw_packet *forw_packet)
558559
}
559560

560561
/**
561-
* batadv_iv_ogm_can_aggregate - find out if an OGM can be aggregated on an
562+
* batadv_iv_ogm_can_aggregate() - find out if an OGM can be aggregated on an
562563
* existing forward packet
563564
* @new_bat_ogm_packet: OGM packet to be aggregated
564565
* @bat_priv: the bat priv with all the soft interface information
@@ -661,7 +662,7 @@ batadv_iv_ogm_can_aggregate(const struct batadv_ogm_packet *new_bat_ogm_packet,
661662
}
662663

663664
/**
664-
* batadv_iv_ogm_aggregate_new - create a new aggregated packet and add this
665+
* batadv_iv_ogm_aggregate_new() - create a new aggregated packet and add this
665666
* packet to it.
666667
* @packet_buff: pointer to the OGM
667668
* @packet_len: (total) length of the OGM
@@ -744,7 +745,7 @@ static void batadv_iv_ogm_aggregate(struct batadv_forw_packet *forw_packet_aggr,
744745
}
745746

746747
/**
747-
* batadv_iv_ogm_queue_add - queue up an OGM for transmission
748+
* batadv_iv_ogm_queue_add() - queue up an OGM for transmission
748749
* @bat_priv: the bat priv with all the soft interface information
749750
* @packet_buff: pointer to the OGM
750751
* @packet_len: (total) length of the OGM
@@ -870,8 +871,8 @@ static void batadv_iv_ogm_forward(struct batadv_orig_node *orig_node,
870871
}
871872

872873
/**
873-
* batadv_iv_ogm_slide_own_bcast_window - bitshift own OGM broadcast windows for
874-
* the given interface
874+
* batadv_iv_ogm_slide_own_bcast_window() - bitshift own OGM broadcast windows
875+
* for the given interface
875876
* @hard_iface: the interface for which the windows have to be shifted
876877
*/
877878
static void
@@ -988,7 +989,7 @@ static void batadv_iv_ogm_schedule(struct batadv_hard_iface *hard_iface)
988989
}
989990

990991
/**
991-
* batadv_iv_ogm_orig_update - use OGM to update corresponding data in an
992+
* batadv_iv_ogm_orig_update() - use OGM to update corresponding data in an
992993
* originator
993994
* @bat_priv: the bat priv with all the soft interface information
994995
* @orig_node: the orig node who originally emitted the ogm packet
@@ -1153,7 +1154,7 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv,
11531154
}
11541155

11551156
/**
1156-
* batadv_iv_ogm_calc_tq - calculate tq for current received ogm packet
1157+
* batadv_iv_ogm_calc_tq() - calculate tq for current received ogm packet
11571158
* @orig_node: the orig node who originally emitted the ogm packet
11581159
* @orig_neigh_node: the orig node struct of the neighbor who sent the packet
11591160
* @batadv_ogm_packet: the ogm packet
@@ -1299,7 +1300,7 @@ static bool batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
12991300
}
13001301

13011302
/**
1302-
* batadv_iv_ogm_update_seqnos - process a batman packet for all interfaces,
1303+
* batadv_iv_ogm_update_seqnos() - process a batman packet for all interfaces,
13031304
* adjust the sequence number and find out whether it is a duplicate
13041305
* @ethhdr: ethernet header of the packet
13051306
* @batadv_ogm_packet: OGM packet to be considered
@@ -1402,7 +1403,8 @@ batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
14021403
}
14031404

14041405
/**
1405-
* batadv_iv_ogm_process_per_outif - process a batman iv OGM for an outgoing if
1406+
* batadv_iv_ogm_process_per_outif() - process a batman iv OGM for an outgoing
1407+
* interface
14061408
* @skb: the skb containing the OGM
14071409
* @ogm_offset: offset from skb->data to start of ogm header
14081410
* @orig_node: the (cached) orig node for the originator of this OGM
@@ -1609,7 +1611,7 @@ batadv_iv_ogm_process_per_outif(const struct sk_buff *skb, int ogm_offset,
16091611
}
16101612

16111613
/**
1612-
* batadv_iv_ogm_process - process an incoming batman iv OGM
1614+
* batadv_iv_ogm_process() - process an incoming batman iv OGM
16131615
* @skb: the skb containing the OGM
16141616
* @ogm_offset: offset to the OGM which should be processed (for aggregates)
16151617
* @if_incoming: the interface where this packet was receved
@@ -1862,7 +1864,7 @@ static int batadv_iv_ogm_receive(struct sk_buff *skb,
18621864

18631865
#ifdef CONFIG_BATMAN_ADV_DEBUGFS
18641866
/**
1865-
* batadv_iv_ogm_orig_print_neigh - print neighbors for the originator table
1867+
* batadv_iv_ogm_orig_print_neigh() - print neighbors for the originator table
18661868
* @orig_node: the orig_node for which the neighbors are printed
18671869
* @if_outgoing: outgoing interface for these entries
18681870
* @seq: debugfs table seq_file struct
@@ -1891,7 +1893,7 @@ batadv_iv_ogm_orig_print_neigh(struct batadv_orig_node *orig_node,
18911893
}
18921894

18931895
/**
1894-
* batadv_iv_ogm_orig_print - print the originator table
1896+
* batadv_iv_ogm_orig_print() - print the originator table
18951897
* @bat_priv: the bat priv with all the soft interface information
18961898
* @seq: debugfs table seq_file struct
18971899
* @if_outgoing: the outgoing interface for which this should be printed
@@ -1961,7 +1963,7 @@ static void batadv_iv_ogm_orig_print(struct batadv_priv *bat_priv,
19611963
#endif
19621964

19631965
/**
1964-
* batadv_iv_ogm_neigh_get_tq_avg - Get the TQ average for a neighbour on a
1966+
* batadv_iv_ogm_neigh_get_tq_avg() - Get the TQ average for a neighbour on a
19651967
* given outgoing interface.
19661968
* @neigh_node: Neighbour of interest
19671969
* @if_outgoing: Outgoing interface of interest
@@ -1987,7 +1989,7 @@ batadv_iv_ogm_neigh_get_tq_avg(struct batadv_neigh_node *neigh_node,
19871989
}
19881990

19891991
/**
1990-
* batadv_iv_ogm_orig_dump_subentry - Dump an originator subentry into a
1992+
* batadv_iv_ogm_orig_dump_subentry() - Dump an originator subentry into a
19911993
* message
19921994
* @msg: Netlink message to dump into
19931995
* @portid: Port making netlink request
@@ -2049,7 +2051,7 @@ batadv_iv_ogm_orig_dump_subentry(struct sk_buff *msg, u32 portid, u32 seq,
20492051
}
20502052

20512053
/**
2052-
* batadv_iv_ogm_orig_dump_entry - Dump an originator entry into a message
2054+
* batadv_iv_ogm_orig_dump_entry() - Dump an originator entry into a message
20532055
* @msg: Netlink message to dump into
20542056
* @portid: Port making netlink request
20552057
* @seq: Sequence number of netlink message
@@ -2111,7 +2113,7 @@ batadv_iv_ogm_orig_dump_entry(struct sk_buff *msg, u32 portid, u32 seq,
21112113
}
21122114

21132115
/**
2114-
* batadv_iv_ogm_orig_dump_bucket - Dump an originator bucket into a
2116+
* batadv_iv_ogm_orig_dump_bucket() - Dump an originator bucket into a
21152117
* message
21162118
* @msg: Netlink message to dump into
21172119
* @portid: Port making netlink request
@@ -2154,7 +2156,7 @@ batadv_iv_ogm_orig_dump_bucket(struct sk_buff *msg, u32 portid, u32 seq,
21542156
}
21552157

21562158
/**
2157-
* batadv_iv_ogm_orig_dump - Dump the originators into a message
2159+
* batadv_iv_ogm_orig_dump() - Dump the originators into a message
21582160
* @msg: Netlink message to dump into
21592161
* @cb: Control block containing additional options
21602162
* @bat_priv: The bat priv with all the soft interface information
@@ -2191,7 +2193,7 @@ batadv_iv_ogm_orig_dump(struct sk_buff *msg, struct netlink_callback *cb,
21912193

21922194
#ifdef CONFIG_BATMAN_ADV_DEBUGFS
21932195
/**
2194-
* batadv_iv_hardif_neigh_print - print a single hop neighbour node
2196+
* batadv_iv_hardif_neigh_print() - print a single hop neighbour node
21952197
* @seq: neighbour table seq_file struct
21962198
* @hardif_neigh: hardif neighbour information
21972199
*/
@@ -2210,7 +2212,7 @@ batadv_iv_hardif_neigh_print(struct seq_file *seq,
22102212
}
22112213

22122214
/**
2213-
* batadv_iv_ogm_neigh_print - print the single hop neighbour list
2215+
* batadv_iv_ogm_neigh_print() - print the single hop neighbour list
22142216
* @bat_priv: the bat priv with all the soft interface information
22152217
* @seq: neighbour table seq_file struct
22162218
*/
@@ -2243,7 +2245,7 @@ static void batadv_iv_neigh_print(struct batadv_priv *bat_priv,
22432245
#endif
22442246

22452247
/**
2246-
* batadv_iv_ogm_neigh_diff - calculate tq difference of two neighbors
2248+
* batadv_iv_ogm_neigh_diff() - calculate tq difference of two neighbors
22472249
* @neigh1: the first neighbor object of the comparison
22482250
* @if_outgoing1: outgoing interface for the first neighbor
22492251
* @neigh2: the second neighbor object of the comparison
@@ -2288,7 +2290,7 @@ static bool batadv_iv_ogm_neigh_diff(struct batadv_neigh_node *neigh1,
22882290
}
22892291

22902292
/**
2291-
* batadv_iv_ogm_neigh_dump_neigh - Dump a neighbour into a netlink message
2293+
* batadv_iv_ogm_neigh_dump_neigh() - Dump a neighbour into a netlink message
22922294
* @msg: Netlink message to dump into
22932295
* @portid: Port making netlink request
22942296
* @seq: Sequence number of netlink message
@@ -2327,7 +2329,7 @@ batadv_iv_ogm_neigh_dump_neigh(struct sk_buff *msg, u32 portid, u32 seq,
23272329
}
23282330

23292331
/**
2330-
* batadv_iv_ogm_neigh_dump_hardif - Dump the neighbours of a hard interface
2332+
* batadv_iv_ogm_neigh_dump_hardif() - Dump the neighbours of a hard interface
23312333
* into a message
23322334
* @msg: Netlink message to dump into
23332335
* @portid: Port making netlink request
@@ -2366,7 +2368,7 @@ batadv_iv_ogm_neigh_dump_hardif(struct sk_buff *msg, u32 portid, u32 seq,
23662368
}
23672369

23682370
/**
2369-
* batadv_iv_ogm_neigh_dump - Dump the neighbours into a message
2371+
* batadv_iv_ogm_neigh_dump() - Dump the neighbours into a message
23702372
* @msg: Netlink message to dump into
23712373
* @cb: Control block containing additional options
23722374
* @bat_priv: The bat priv with all the soft interface information
@@ -2418,7 +2420,7 @@ batadv_iv_ogm_neigh_dump(struct sk_buff *msg, struct netlink_callback *cb,
24182420
}
24192421

24202422
/**
2421-
* batadv_iv_ogm_neigh_cmp - compare the metrics of two neighbors
2423+
* batadv_iv_ogm_neigh_cmp() - compare the metrics of two neighbors
24222424
* @neigh1: the first neighbor object of the comparison
24232425
* @if_outgoing1: outgoing interface for the first neighbor
24242426
* @neigh2: the second neighbor object of the comparison
@@ -2444,7 +2446,7 @@ static int batadv_iv_ogm_neigh_cmp(struct batadv_neigh_node *neigh1,
24442446
}
24452447

24462448
/**
2447-
* batadv_iv_ogm_neigh_is_sob - check if neigh1 is similarly good or better
2449+
* batadv_iv_ogm_neigh_is_sob() - check if neigh1 is similarly good or better
24482450
* than neigh2 from the metric prospective
24492451
* @neigh1: the first neighbor object of the comparison
24502452
* @if_outgoing1: outgoing interface for the first neighbor
@@ -2479,7 +2481,7 @@ static void batadv_iv_iface_activate(struct batadv_hard_iface *hard_iface)
24792481
}
24802482

24812483
/**
2482-
* batadv_iv_init_sel_class - initialize GW selection class
2484+
* batadv_iv_init_sel_class() - initialize GW selection class
24832485
* @bat_priv: the bat priv with all the soft interface information
24842486
*/
24852487
static void batadv_iv_init_sel_class(struct batadv_priv *bat_priv)
@@ -2704,7 +2706,7 @@ static void batadv_iv_gw_print(struct batadv_priv *bat_priv,
27042706
#endif
27052707

27062708
/**
2707-
* batadv_iv_gw_dump_entry - Dump a gateway into a message
2709+
* batadv_iv_gw_dump_entry() - Dump a gateway into a message
27082710
* @msg: Netlink message to dump into
27092711
* @portid: Port making netlink request
27102712
* @seq: Sequence number of netlink message
@@ -2775,7 +2777,7 @@ static int batadv_iv_gw_dump_entry(struct sk_buff *msg, u32 portid, u32 seq,
27752777
}
27762778

27772779
/**
2778-
* batadv_iv_gw_dump - Dump gateways into a message
2780+
* batadv_iv_gw_dump() - Dump gateways into a message
27792781
* @msg: Netlink message to dump into
27802782
* @cb: Control block containing additional options
27812783
* @bat_priv: The bat priv with all the soft interface information

0 commit comments

Comments
 (0)