Skip to content

Commit 62fe710

Browse files
ecsvordex
authored andcommitted
batman-adv: Fix kerneldoc parsing of return description
Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
1 parent d1f6825 commit 62fe710

22 files changed

Lines changed: 305 additions & 229 deletions

‎net/batman-adv/bat_iv_ogm.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static void batadv_ring_buffer_set(u8 lq_recv[], u8 *lq_index, u8 value)
8888
* in the given ring buffer
8989
* @lq_recv: pointer to the ring buffer
9090
*
91-
* Returns computed average value.
91+
* Return: computed average value.
9292
*/
9393
static u8 batadv_ring_buffer_avg(const u8 lq_recv[])
9494
{
@@ -132,7 +132,7 @@ static void batadv_iv_ogm_orig_free(struct batadv_orig_node *orig_node)
132132
* @orig_node: the orig_node that has to be changed
133133
* @max_if_num: the current amount of interfaces
134134
*
135-
* Returns 0 on success, a negative error code otherwise.
135+
* Return: 0 on success, a negative error code otherwise.
136136
*/
137137
static int batadv_iv_ogm_orig_add_if(struct batadv_orig_node *orig_node,
138138
int max_if_num)
@@ -180,7 +180,7 @@ static int batadv_iv_ogm_orig_add_if(struct batadv_orig_node *orig_node,
180180
* @max_if_num: the current amount of interfaces
181181
* @del_if_num: the index of the interface being removed
182182
*
183-
* Returns 0 on success, a negative error code otherwise.
183+
* Return: 0 on success, a negative error code otherwise.
184184
*/
185185
static int batadv_iv_ogm_orig_del_if(struct batadv_orig_node *orig_node,
186186
int max_if_num, int del_if_num)
@@ -246,7 +246,7 @@ static int batadv_iv_ogm_orig_del_if(struct batadv_orig_node *orig_node,
246246
* @bat_priv: the bat priv with all the soft interface information
247247
* @addr: mac address of the originator
248248
*
249-
* Returns the originator object corresponding to the passed mac address or NULL
249+
* Return: the originator object corresponding to the passed mac address or NULL
250250
* on failure.
251251
* If the object does not exists it is created an initialised.
252252
*/
@@ -522,7 +522,7 @@ static void batadv_iv_ogm_emit(struct batadv_forw_packet *forw_packet)
522522
* @if_outgoing: interface for which the retransmission should be considered
523523
* @forw_packet: the forwarded packet which should be checked
524524
*
525-
* Returns true if new_packet can be aggregated with forw_packet
525+
* Return: true if new_packet can be aggregated with forw_packet
526526
*/
527527
static bool
528528
batadv_iv_ogm_can_aggregate(const struct batadv_ogm_packet *new_bat_ogm_packet,
@@ -1125,7 +1125,7 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv,
11251125
* @if_incoming: interface where the packet was received
11261126
* @if_outgoing: interface for which the retransmission should be considered
11271127
*
1128-
* Returns 1 if the link can be considered bidirectional, 0 otherwise
1128+
* Return: 1 if the link can be considered bidirectional, 0 otherwise
11291129
*/
11301130
static int batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
11311131
struct batadv_orig_node *orig_neigh_node,
@@ -1269,7 +1269,7 @@ static int batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
12691269
* @if_incoming: interface on which the OGM packet was received
12701270
* @if_outgoing: interface for which the retransmission should be considered
12711271
*
1272-
* Returns duplicate status as enum batadv_dup_status
1272+
* Return: duplicate status as enum batadv_dup_status
12731273
*/
12741274
static enum batadv_dup_status
12751275
batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
@@ -1929,7 +1929,7 @@ static void batadv_iv_neigh_print(struct batadv_priv *bat_priv,
19291929
* @neigh2: the second neighbor object of the comparison
19301930
* @if_outgoing2: outgoing interface for the second neighbor
19311931
*
1932-
* Returns a value less, equal to or greater than 0 if the metric via neigh1 is
1932+
* Return: a value less, equal to or greater than 0 if the metric via neigh1 is
19331933
* lower, the same as or higher than the metric via neigh2
19341934
*/
19351935
static int batadv_iv_ogm_neigh_cmp(struct batadv_neigh_node *neigh1,
@@ -1970,7 +1970,7 @@ static int batadv_iv_ogm_neigh_cmp(struct batadv_neigh_node *neigh1,
19701970
* @neigh2: the second neighbor object of the comparison
19711971
* @if_outgoing2: outgoing interface for the second neighbor
19721972
*
1973-
* Returns true if the metric via neigh1 is equally good or better than
1973+
* Return: true if the metric via neigh1 is equally good or better than
19741974
* the metric via neigh2, false otherwise.
19751975
*/
19761976
static bool

‎net/batman-adv/bitarray.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static void batadv_bitmap_shift_left(unsigned long *seq_bits, s32 n)
3131

3232
/* receive and process one packet within the sequence number window.
3333
*
34-
* returns:
34+
* Return:
3535
* 1 if the window was moved (either new or very old)
3636
* 0 if the window was not moved/shifted.
3737
*/

‎net/batman-adv/bitarray.h‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
#include <linux/compiler.h>
2525
#include <linux/types.h>
2626

27-
/* Returns 1 if the corresponding bit in the given seq_bits indicates true
27+
/**
28+
* batadv_test_bit
29+
*
30+
* Return: 1 if the corresponding bit in the given seq_bits indicates true
2831
* and curr_seqno is within range of last_seqno. Otherwise returns 0.
2932
*/
3033
static inline int batadv_test_bit(const unsigned long *seq_bits,
@@ -48,8 +51,10 @@ static inline void batadv_set_bit(unsigned long *seq_bits, s32 n)
4851
set_bit(n, seq_bits); /* turn the position on */
4952
}
5053

51-
/* receive and process one packet, returns 1 if received seq_num is considered
52-
* new, 0 if old
54+
/**
55+
* batadv_bit_get_packet - receive and process one packet
56+
*
57+
* Return: 1 if received seq_num is considered new, 0 if old
5358
*/
5459
int batadv_bit_get_packet(void *priv, unsigned long *seq_bits, s32 seq_num_diff,
5560
int set_mark);

‎net/batman-adv/bridge_loop_avoidance.c‎

Lines changed: 48 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ static void
5858
batadv_bla_send_announce(struct batadv_priv *bat_priv,
5959
struct batadv_bla_backbone_gw *backbone_gw);
6060

61-
/* return the index of the claim */
61+
/**
62+
* batadv_choose_claim
63+
*
64+
* Return: the index of the claim
65+
*/
6266
static inline u32 batadv_choose_claim(const void *data, u32 size)
6367
{
6468
struct batadv_bla_claim *claim = (struct batadv_bla_claim *)data;
@@ -70,7 +74,11 @@ static inline u32 batadv_choose_claim(const void *data, u32 size)
7074
return hash % size;
7175
}
7276

73-
/* return the index of the backbone gateway */
77+
/**
78+
* batadv_choose_backbone_gw
79+
*
80+
* Return: the index of the backbone gateway
81+
*/
7482
static inline u32 batadv_choose_backbone_gw(const void *data, u32 size)
7583
{
7684
const struct batadv_bla_claim *claim = (struct batadv_bla_claim *)data;
@@ -145,8 +153,9 @@ static void batadv_claim_free_ref(struct batadv_bla_claim *claim)
145153
* @bat_priv: the bat priv with all the soft interface information
146154
* @data: search data (may be local/static data)
147155
*
148-
* looks for a claim in the hash, and returns it if found
149-
* or NULL otherwise.
156+
* looks for a claim in the hash
157+
*
158+
* Return: claim if found or NULL otherwise.
150159
*/
151160
static struct batadv_bla_claim
152161
*batadv_claim_hash_find(struct batadv_priv *bat_priv,
@@ -186,7 +195,7 @@ static struct batadv_bla_claim
186195
* @addr: the address of the originator
187196
* @vid: the VLAN ID
188197
*
189-
* Returns claim if found or NULL otherwise.
198+
* Return: claim if found or NULL otherwise.
190199
*/
191200
static struct batadv_bla_backbone_gw *
192201
batadv_backbone_hash_find(struct batadv_priv *bat_priv, u8 *addr,
@@ -666,7 +675,11 @@ static void batadv_bla_del_claim(struct batadv_priv *bat_priv,
666675
batadv_claim_free_ref(claim);
667676
}
668677

669-
/* check for ANNOUNCE frame, return 1 if handled */
678+
/**
679+
* batadv_handle_announce - check for ANNOUNCE frame
680+
*
681+
* Return: 1 if handled
682+
*/
670683
static int batadv_handle_announce(struct batadv_priv *bat_priv, u8 *an_addr,
671684
u8 *backbone_addr, unsigned short vid)
672685
{
@@ -716,7 +729,11 @@ static int batadv_handle_announce(struct batadv_priv *bat_priv, u8 *an_addr,
716729
return 1;
717730
}
718731

719-
/* check for REQUEST frame, return 1 if handled */
732+
/**
733+
* batadv_handle_request - check for REQUEST frame
734+
*
735+
* Return: 1 if handled
736+
*/
720737
static int batadv_handle_request(struct batadv_priv *bat_priv,
721738
struct batadv_hard_iface *primary_if,
722739
u8 *backbone_addr, struct ethhdr *ethhdr,
@@ -740,7 +757,11 @@ static int batadv_handle_request(struct batadv_priv *bat_priv,
740757
return 1;
741758
}
742759

743-
/* check for UNCLAIM frame, return 1 if handled */
760+
/**
761+
* batadv_handle_unclaim - check for UNCLAIM frame
762+
*
763+
* Return: 1 if handled
764+
*/
744765
static int batadv_handle_unclaim(struct batadv_priv *bat_priv,
745766
struct batadv_hard_iface *primary_if,
746767
u8 *backbone_addr, u8 *claim_addr,
@@ -769,7 +790,11 @@ static int batadv_handle_unclaim(struct batadv_priv *bat_priv,
769790
return 1;
770791
}
771792

772-
/* check for CLAIM frame, return 1 if handled */
793+
/**
794+
* batadv_handle_claim - check for CLAIM frame
795+
*
796+
* Return: 1 if handled
797+
*/
773798
static int batadv_handle_claim(struct batadv_priv *bat_priv,
774799
struct batadv_hard_iface *primary_if,
775800
u8 *backbone_addr, u8 *claim_addr,
@@ -809,7 +834,7 @@ static int batadv_handle_claim(struct batadv_priv *bat_priv,
809834
* This function also applies the group ID of the sender
810835
* if it is in the same mesh.
811836
*
812-
* returns:
837+
* Return:
813838
* 2 - if it is a claim packet and on the same group
814839
* 1 - if is a claim packet from another group
815840
* 0 - if it is not a claim packet
@@ -880,7 +905,7 @@ static int batadv_check_claim_group(struct batadv_priv *bat_priv,
880905
*
881906
* Check if this is a claim frame, and process it accordingly.
882907
*
883-
* returns 1 if it was a claim frame, otherwise return 0 to
908+
* Return: 1 if it was a claim frame, otherwise return 0 to
884909
* tell the callee that it can use the frame on its own.
885910
*/
886911
static int batadv_bla_process_claim(struct batadv_priv *bat_priv,
@@ -1397,7 +1422,7 @@ int batadv_bla_check_bcast_duplist(struct batadv_priv *bat_priv,
13971422
*
13981423
* Check if the originator is a gateway for the VLAN identified by vid.
13991424
*
1400-
* Returns true if orig is a backbone for this vid, false otherwise.
1425+
* Return: true if orig is a backbone for this vid, false otherwise.
14011426
*/
14021427
bool batadv_bla_is_backbone_gw_orig(struct batadv_priv *bat_priv, u8 *orig,
14031428
unsigned short vid)
@@ -1436,9 +1461,10 @@ bool batadv_bla_is_backbone_gw_orig(struct batadv_priv *bat_priv, u8 *orig,
14361461
* @orig_node: the orig_node of the frame
14371462
* @hdr_size: maximum length of the frame
14381463
*
1439-
* bla_is_backbone_gw inspects the skb for the VLAN ID and returns 1
1440-
* if the orig_node is also a gateway on the soft interface, otherwise it
1441-
* returns 0.
1464+
* bla_is_backbone_gw inspects the skb for the VLAN ID
1465+
*
1466+
* Return: 1 if the orig_node is also a gateway on the soft interface, otherwise
1467+
* it returns 0.
14421468
*/
14431469
int batadv_bla_is_backbone_gw(struct sk_buff *skb,
14441470
struct batadv_orig_node *orig_node, int hdr_size)
@@ -1498,8 +1524,9 @@ void batadv_bla_free(struct batadv_priv *bat_priv)
14981524
* * we have to race for a claim
14991525
* * if the frame is allowed on the LAN
15001526
*
1501-
* in these cases, the skb is further handled by this function and
1502-
* returns 1, otherwise it returns 0 and the caller shall further
1527+
* in these cases, the skb is further handled by this function
1528+
*
1529+
* Return: 1 if handled, otherwise it returns 0 and the caller shall further
15031530
* process the skb.
15041531
*/
15051532
int batadv_bla_rx(struct batadv_priv *bat_priv, struct sk_buff *skb,
@@ -1592,11 +1619,12 @@ int batadv_bla_rx(struct batadv_priv *bat_priv, struct sk_buff *skb,
15921619
* * a claim was received which has to be processed
15931620
* * the frame is allowed on the mesh
15941621
*
1595-
* in these cases, the skb is further handled by this function and
1596-
* returns 1, otherwise it returns 0 and the caller shall further
1597-
* process the skb.
1622+
* in these cases, the skb is further handled by this function.
15981623
*
15991624
* This call might reallocate skb data.
1625+
*
1626+
* Return: 1 if handled, otherwise it returns 0 and the caller shall further
1627+
* process the skb.
16001628
*/
16011629
int batadv_bla_tx(struct batadv_priv *bat_priv, struct sk_buff *skb,
16021630
unsigned short vid)

0 commit comments

Comments
 (0)