Skip to content

Commit

Permalink
batman-adv: Fix kerneldoc parsing of return description
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Eckelmann <[email protected]>
Signed-off-by: Marek Lindner <[email protected]>
Signed-off-by: Antonio Quartulli <[email protected]>
  • Loading branch information
ecsv authored and ordex committed Feb 2, 2016
1 parent d1f6825 commit 62fe710
Show file tree
Hide file tree
Showing 22 changed files with 305 additions and 229 deletions.
18 changes: 9 additions & 9 deletions net/batman-adv/bat_iv_ogm.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static void batadv_ring_buffer_set(u8 lq_recv[], u8 *lq_index, u8 value)
* in the given ring buffer
* @lq_recv: pointer to the ring buffer
*
* Returns computed average value.
* Return: computed average value.
*/
static u8 batadv_ring_buffer_avg(const u8 lq_recv[])
{
Expand Down Expand Up @@ -132,7 +132,7 @@ static void batadv_iv_ogm_orig_free(struct batadv_orig_node *orig_node)
* @orig_node: the orig_node that has to be changed
* @max_if_num: the current amount of interfaces
*
* Returns 0 on success, a negative error code otherwise.
* Return: 0 on success, a negative error code otherwise.
*/
static int batadv_iv_ogm_orig_add_if(struct batadv_orig_node *orig_node,
int max_if_num)
Expand Down Expand Up @@ -180,7 +180,7 @@ static int batadv_iv_ogm_orig_add_if(struct batadv_orig_node *orig_node,
* @max_if_num: the current amount of interfaces
* @del_if_num: the index of the interface being removed
*
* Returns 0 on success, a negative error code otherwise.
* Return: 0 on success, a negative error code otherwise.
*/
static int batadv_iv_ogm_orig_del_if(struct batadv_orig_node *orig_node,
int max_if_num, int del_if_num)
Expand Down Expand Up @@ -246,7 +246,7 @@ static int batadv_iv_ogm_orig_del_if(struct batadv_orig_node *orig_node,
* @bat_priv: the bat priv with all the soft interface information
* @addr: mac address of the originator
*
* Returns the originator object corresponding to the passed mac address or NULL
* Return: the originator object corresponding to the passed mac address or NULL
* on failure.
* If the object does not exists it is created an initialised.
*/
Expand Down Expand Up @@ -522,7 +522,7 @@ static void batadv_iv_ogm_emit(struct batadv_forw_packet *forw_packet)
* @if_outgoing: interface for which the retransmission should be considered
* @forw_packet: the forwarded packet which should be checked
*
* Returns true if new_packet can be aggregated with forw_packet
* Return: true if new_packet can be aggregated with forw_packet
*/
static bool
batadv_iv_ogm_can_aggregate(const struct batadv_ogm_packet *new_bat_ogm_packet,
Expand Down Expand Up @@ -1125,7 +1125,7 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv,
* @if_incoming: interface where the packet was received
* @if_outgoing: interface for which the retransmission should be considered
*
* Returns 1 if the link can be considered bidirectional, 0 otherwise
* Return: 1 if the link can be considered bidirectional, 0 otherwise
*/
static int batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
struct batadv_orig_node *orig_neigh_node,
Expand Down Expand Up @@ -1269,7 +1269,7 @@ static int batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
* @if_incoming: interface on which the OGM packet was received
* @if_outgoing: interface for which the retransmission should be considered
*
* Returns duplicate status as enum batadv_dup_status
* Return: duplicate status as enum batadv_dup_status
*/
static enum batadv_dup_status
batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
Expand Down Expand Up @@ -1929,7 +1929,7 @@ static void batadv_iv_neigh_print(struct batadv_priv *bat_priv,
* @neigh2: the second neighbor object of the comparison
* @if_outgoing2: outgoing interface for the second neighbor
*
* Returns a value less, equal to or greater than 0 if the metric via neigh1 is
* Return: a value less, equal to or greater than 0 if the metric via neigh1 is
* lower, the same as or higher than the metric via neigh2
*/
static int batadv_iv_ogm_neigh_cmp(struct batadv_neigh_node *neigh1,
Expand Down Expand Up @@ -1970,7 +1970,7 @@ static int batadv_iv_ogm_neigh_cmp(struct batadv_neigh_node *neigh1,
* @neigh2: the second neighbor object of the comparison
* @if_outgoing2: outgoing interface for the second neighbor
*
* Returns true if the metric via neigh1 is equally good or better than
* Return: true if the metric via neigh1 is equally good or better than
* the metric via neigh2, false otherwise.
*/
static bool
Expand Down
2 changes: 1 addition & 1 deletion net/batman-adv/bitarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static void batadv_bitmap_shift_left(unsigned long *seq_bits, s32 n)

/* receive and process one packet within the sequence number window.
*
* returns:
* Return:
* 1 if the window was moved (either new or very old)
* 0 if the window was not moved/shifted.
*/
Expand Down
11 changes: 8 additions & 3 deletions net/batman-adv/bitarray.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
#include <linux/compiler.h>
#include <linux/types.h>

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

/* receive and process one packet, returns 1 if received seq_num is considered
* new, 0 if old
/**
* batadv_bit_get_packet - receive and process one packet
*
* Return: 1 if received seq_num is considered new, 0 if old
*/
int batadv_bit_get_packet(void *priv, unsigned long *seq_bits, s32 seq_num_diff,
int set_mark);
Expand Down
68 changes: 48 additions & 20 deletions net/batman-adv/bridge_loop_avoidance.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ static void
batadv_bla_send_announce(struct batadv_priv *bat_priv,
struct batadv_bla_backbone_gw *backbone_gw);

/* return the index of the claim */
/**
* batadv_choose_claim
*
* Return: the index of the claim
*/
static inline u32 batadv_choose_claim(const void *data, u32 size)
{
struct batadv_bla_claim *claim = (struct batadv_bla_claim *)data;
Expand All @@ -70,7 +74,11 @@ static inline u32 batadv_choose_claim(const void *data, u32 size)
return hash % size;
}

/* return the index of the backbone gateway */
/**
* batadv_choose_backbone_gw
*
* Return: the index of the backbone gateway
*/
static inline u32 batadv_choose_backbone_gw(const void *data, u32 size)
{
const struct batadv_bla_claim *claim = (struct batadv_bla_claim *)data;
Expand Down Expand Up @@ -145,8 +153,9 @@ static void batadv_claim_free_ref(struct batadv_bla_claim *claim)
* @bat_priv: the bat priv with all the soft interface information
* @data: search data (may be local/static data)
*
* looks for a claim in the hash, and returns it if found
* or NULL otherwise.
* looks for a claim in the hash
*
* Return: claim if found or NULL otherwise.
*/
static struct batadv_bla_claim
*batadv_claim_hash_find(struct batadv_priv *bat_priv,
Expand Down Expand Up @@ -186,7 +195,7 @@ static struct batadv_bla_claim
* @addr: the address of the originator
* @vid: the VLAN ID
*
* Returns claim if found or NULL otherwise.
* Return: claim if found or NULL otherwise.
*/
static struct batadv_bla_backbone_gw *
batadv_backbone_hash_find(struct batadv_priv *bat_priv, u8 *addr,
Expand Down Expand Up @@ -666,7 +675,11 @@ static void batadv_bla_del_claim(struct batadv_priv *bat_priv,
batadv_claim_free_ref(claim);
}

/* check for ANNOUNCE frame, return 1 if handled */
/**
* batadv_handle_announce - check for ANNOUNCE frame
*
* Return: 1 if handled
*/
static int batadv_handle_announce(struct batadv_priv *bat_priv, u8 *an_addr,
u8 *backbone_addr, unsigned short vid)
{
Expand Down Expand Up @@ -716,7 +729,11 @@ static int batadv_handle_announce(struct batadv_priv *bat_priv, u8 *an_addr,
return 1;
}

/* check for REQUEST frame, return 1 if handled */
/**
* batadv_handle_request - check for REQUEST frame
*
* Return: 1 if handled
*/
static int batadv_handle_request(struct batadv_priv *bat_priv,
struct batadv_hard_iface *primary_if,
u8 *backbone_addr, struct ethhdr *ethhdr,
Expand All @@ -740,7 +757,11 @@ static int batadv_handle_request(struct batadv_priv *bat_priv,
return 1;
}

/* check for UNCLAIM frame, return 1 if handled */
/**
* batadv_handle_unclaim - check for UNCLAIM frame
*
* Return: 1 if handled
*/
static int batadv_handle_unclaim(struct batadv_priv *bat_priv,
struct batadv_hard_iface *primary_if,
u8 *backbone_addr, u8 *claim_addr,
Expand Down Expand Up @@ -769,7 +790,11 @@ static int batadv_handle_unclaim(struct batadv_priv *bat_priv,
return 1;
}

/* check for CLAIM frame, return 1 if handled */
/**
* batadv_handle_claim - check for CLAIM frame
*
* Return: 1 if handled
*/
static int batadv_handle_claim(struct batadv_priv *bat_priv,
struct batadv_hard_iface *primary_if,
u8 *backbone_addr, u8 *claim_addr,
Expand Down Expand Up @@ -809,7 +834,7 @@ static int batadv_handle_claim(struct batadv_priv *bat_priv,
* This function also applies the group ID of the sender
* if it is in the same mesh.
*
* returns:
* Return:
* 2 - if it is a claim packet and on the same group
* 1 - if is a claim packet from another group
* 0 - if it is not a claim packet
Expand Down Expand Up @@ -880,7 +905,7 @@ static int batadv_check_claim_group(struct batadv_priv *bat_priv,
*
* Check if this is a claim frame, and process it accordingly.
*
* returns 1 if it was a claim frame, otherwise return 0 to
* Return: 1 if it was a claim frame, otherwise return 0 to
* tell the callee that it can use the frame on its own.
*/
static int batadv_bla_process_claim(struct batadv_priv *bat_priv,
Expand Down Expand Up @@ -1397,7 +1422,7 @@ int batadv_bla_check_bcast_duplist(struct batadv_priv *bat_priv,
*
* Check if the originator is a gateway for the VLAN identified by vid.
*
* Returns true if orig is a backbone for this vid, false otherwise.
* Return: true if orig is a backbone for this vid, false otherwise.
*/
bool batadv_bla_is_backbone_gw_orig(struct batadv_priv *bat_priv, u8 *orig,
unsigned short vid)
Expand Down Expand Up @@ -1436,9 +1461,10 @@ bool batadv_bla_is_backbone_gw_orig(struct batadv_priv *bat_priv, u8 *orig,
* @orig_node: the orig_node of the frame
* @hdr_size: maximum length of the frame
*
* bla_is_backbone_gw inspects the skb for the VLAN ID and returns 1
* if the orig_node is also a gateway on the soft interface, otherwise it
* returns 0.
* bla_is_backbone_gw inspects the skb for the VLAN ID
*
* Return: 1 if the orig_node is also a gateway on the soft interface, otherwise
* it returns 0.
*/
int batadv_bla_is_backbone_gw(struct sk_buff *skb,
struct batadv_orig_node *orig_node, int hdr_size)
Expand Down Expand Up @@ -1498,8 +1524,9 @@ void batadv_bla_free(struct batadv_priv *bat_priv)
* * we have to race for a claim
* * if the frame is allowed on the LAN
*
* in these cases, the skb is further handled by this function and
* returns 1, otherwise it returns 0 and the caller shall further
* in these cases, the skb is further handled by this function
*
* Return: 1 if handled, otherwise it returns 0 and the caller shall further
* process the skb.
*/
int batadv_bla_rx(struct batadv_priv *bat_priv, struct sk_buff *skb,
Expand Down Expand Up @@ -1592,11 +1619,12 @@ int batadv_bla_rx(struct batadv_priv *bat_priv, struct sk_buff *skb,
* * a claim was received which has to be processed
* * the frame is allowed on the mesh
*
* in these cases, the skb is further handled by this function and
* returns 1, otherwise it returns 0 and the caller shall further
* process the skb.
* in these cases, the skb is further handled by this function.
*
* This call might reallocate skb data.
*
* Return: 1 if handled, otherwise it returns 0 and the caller shall further
* process the skb.
*/
int batadv_bla_tx(struct batadv_priv *bat_priv, struct sk_buff *skb,
unsigned short vid)
Expand Down
Loading

0 comments on commit 62fe710

Please sign in to comment.