Skip to content

Commit

Permalink
net: Fix (nearly-)kernel-doc comments for various functions
Browse files Browse the repository at this point in the history
Fix incorrect start markers, wrapped summary lines, missing section
breaks, incorrect separators, and some name mismatches.

Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Ben Hutchings authored and davem330 committed Jul 11, 2012
1 parent a55b138 commit 2c53040
Show file tree
Hide file tree
Showing 46 changed files with 163 additions and 103 deletions.
2 changes: 1 addition & 1 deletion net/9p/trans_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ static int p9_virtio_cancel(struct p9_client *client, struct p9_req_t *req)
* this takes a list of pages.
* @sg: scatter/gather list to pack into
* @start: which segment of the sg_list to start at
* @**pdata: a list of pages to add into sg.
* @pdata: a list of pages to add into sg.
* @nr_pages: number of pages to pack into the scatter/gather list
* @data: data to pack into scatter/gather list
* @count: amount of data to pack into the scatter/gather list
Expand Down
8 changes: 4 additions & 4 deletions net/appletalk/ddp.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ static struct sock *atalk_search_socket(struct sockaddr_at *to,

/**
* atalk_find_or_insert_socket - Try to find a socket matching ADDR
* @sk - socket to insert in the list if it is not there already
* @sat - address to search for
* @sk: socket to insert in the list if it is not there already
* @sat: address to search for
*
* Try to find a socket matching ADDR in the socket list, if found then return
* it. If not, insert SK into the socket list.
Expand Down Expand Up @@ -1066,8 +1066,8 @@ static int atalk_release(struct socket *sock)

/**
* atalk_pick_and_bind_port - Pick a source port when one is not given
* @sk - socket to insert into the tables
* @sat - address to search for
* @sk: socket to insert into the tables
* @sat: address to search for
*
* Pick a source port when one is not given. If we can find a suitable free
* one, we insert the socket into the tables using it.
Expand Down
51 changes: 34 additions & 17 deletions net/batman-adv/bridge_loop_avoidance.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,13 @@ static struct batadv_claim *batadv_claim_hash_find(struct batadv_priv *bat_priv,
return claim_tmp;
}

/* @bat_priv: the bat priv with all the soft interface information
/**
* batadv_backbone_hash_find - looks for a claim in the hash
* @bat_priv: the bat priv with all the soft interface information
* @addr: the address of the originator
* @vid: the VLAN ID
*
* looks for a claim in the hash, and returns it if found
* or NULL otherwise.
* Returns claim if found or NULL otherwise.
*/
static struct batadv_backbone_gw *
batadv_backbone_hash_find(struct batadv_priv *bat_priv,
Expand Down Expand Up @@ -242,12 +243,12 @@ batadv_bla_del_backbone_claims(struct batadv_backbone_gw *backbone_gw)
backbone_gw->crc = BATADV_BLA_CRC_INIT;
}

/* @bat_priv: the bat priv with all the soft interface information
/**
* batadv_bla_send_claim - sends a claim frame according to the provided info
* @bat_priv: the bat priv with all the soft interface information
* @orig: the mac address to be announced within the claim
* @vid: the VLAN ID
* @claimtype: the type of the claim (CLAIM, UNCLAIM, ANNOUNCE, ...)
*
* sends a claim frame according to the provided info.
*/
static void batadv_bla_send_claim(struct batadv_priv *bat_priv, uint8_t *mac,
short vid, int claimtype)
Expand Down Expand Up @@ -348,7 +349,9 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, uint8_t *mac,
batadv_hardif_free_ref(primary_if);
}

/* @bat_priv: the bat priv with all the soft interface information
/**
* batadv_bla_get_backbone_gw
* @bat_priv: the bat priv with all the soft interface information
* @orig: the mac address of the originator
* @vid: the VLAN ID
*
Expand Down Expand Up @@ -520,12 +523,12 @@ static void batadv_bla_send_announce(struct batadv_priv *bat_priv,

}

/* @bat_priv: the bat priv with all the soft interface information
/**
* batadv_bla_add_claim - Adds a claim in the claim hash
* @bat_priv: the bat priv with all the soft interface information
* @mac: the mac address of the claim
* @vid: the VLAN ID of the frame
* @backbone_gw: the backbone gateway which claims it
*
* Adds a claim in the claim hash.
*/
static void batadv_bla_add_claim(struct batadv_priv *bat_priv,
const uint8_t *mac, const short vid,
Expand Down Expand Up @@ -743,7 +746,9 @@ static int batadv_handle_claim(struct batadv_priv *bat_priv,
return 1;
}

/* @bat_priv: the bat priv with all the soft interface information
/**
* batadv_check_claim_group
* @bat_priv: the bat priv with all the soft interface information
* @hw_src: the Hardware source in the ARP Header
* @hw_dst: the Hardware destination in the ARP Header
* @ethhdr: pointer to the Ethernet header of the claim frame
Expand Down Expand Up @@ -975,7 +980,9 @@ static void batadv_bla_purge_backbone_gw(struct batadv_priv *bat_priv, int now)
}
}

/* @bat_priv: the bat priv with all the soft interface information
/**
* batadv_bla_purge_claims
* @bat_priv: the bat priv with all the soft interface information
* @primary_if: the selected primary interface, may be NULL if now is set
* @now: whether the whole hash shall be wiped now
*
Expand Down Expand Up @@ -1023,7 +1030,9 @@ static void batadv_bla_purge_claims(struct batadv_priv *bat_priv,
}
}

/* @bat_priv: the bat priv with all the soft interface information
/**
* batadv_bla_update_orig_address
* @bat_priv: the bat priv with all the soft interface information
* @primary_if: the new selected primary_if
* @oldif: the old primary interface, may be NULL
*
Expand Down Expand Up @@ -1193,7 +1202,9 @@ int batadv_bla_init(struct batadv_priv *bat_priv)
return 0;
}

/* @bat_priv: the bat priv with all the soft interface information
/**
* batadv_bla_check_bcast_duplist
* @bat_priv: the bat priv with all the soft interface information
* @bcast_packet: originator mac address
* @hdr_size: maximum length of the frame
*
Expand Down Expand Up @@ -1297,7 +1308,9 @@ int batadv_bla_is_backbone_gw_orig(struct batadv_priv *bat_priv, uint8_t *orig)
}


/* @skb: the frame to be checked
/**
* batadv_bla_is_backbone_gw
* @skb: the frame to be checked
* @orig_node: the orig_node of the frame
* @hdr_size: maximum length of the frame
*
Expand Down Expand Up @@ -1363,7 +1376,9 @@ void batadv_bla_free(struct batadv_priv *bat_priv)
batadv_hardif_free_ref(primary_if);
}

/* @bat_priv: the bat priv with all the soft interface information
/**
* batadv_bla_rx
* @bat_priv: the bat priv with all the soft interface information
* @skb: the frame to be checked
* @vid: the VLAN ID of the frame
*
Expand Down Expand Up @@ -1450,7 +1465,9 @@ int batadv_bla_rx(struct batadv_priv *bat_priv, struct sk_buff *skb, short vid)
return ret;
}

/* @bat_priv: the bat priv with all the soft interface information
/**
* batadv_bla_tx
* @bat_priv: the bat priv with all the soft interface information
* @skb: the frame to be checked
* @vid: the VLAN ID of the frame
*
Expand Down
3 changes: 2 additions & 1 deletion net/batman-adv/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ static inline void batadv_hash_delete(struct batadv_hashtable *hash,
batadv_hash_destroy(hash);
}

/* hash_add - adds data to the hashtable
/**
* batadv_hash_add - adds data to the hashtable
* @hash: storage hash table
* @compare: callback to determine if 2 hash elements are identical
* @choose: callback calculating the hash index
Expand Down
3 changes: 2 additions & 1 deletion net/batman-adv/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ static inline int batadv_compare_eth(const void *data1, const void *data2)
return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0);
}

/* has_timed_out - compares current time (jiffies) and timestamp + timeout
/**
* has_timed_out - compares current time (jiffies) and timestamp + timeout
* @timestamp: base value to compare with (in jiffies)
* @timeout: added to base value before comparing (in milliseconds)
*
Expand Down
3 changes: 2 additions & 1 deletion net/batman-adv/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ struct batadv_hard_iface {
struct rcu_head rcu;
};

/* batadv_orig_node - structure for orig_list maintaining nodes of mesh
/**
* struct batadv_orig_node - structure for orig_list maintaining nodes of mesh
* @primary_addr: hosts primary interface address
* @last_seen: when last packet from this node was received
* @bcast_seqno_reset: time when the broadcast seqno window was reset
Expand Down
8 changes: 5 additions & 3 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,8 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
rcu_read_unlock();
}

/* netif_setup_tc - Handle tc mappings on real_num_tx_queues change
/**
* netif_setup_tc - Handle tc mappings on real_num_tx_queues change
* @dev: Network device
* @txq: number of queues available
*
Expand Down Expand Up @@ -1793,7 +1794,8 @@ int netif_set_real_num_rx_queues(struct net_device *dev, unsigned int rxq)
EXPORT_SYMBOL(netif_set_real_num_rx_queues);
#endif

/* netif_get_num_default_rss_queues - default number of RSS queues
/**
* netif_get_num_default_rss_queues - default number of RSS queues
*
* This routine should set an upper limit on the number of RSS queues
* used by default by multiqueue devices.
Expand Down Expand Up @@ -5670,7 +5672,7 @@ int netdev_refcnt_read(const struct net_device *dev)
}
EXPORT_SYMBOL(netdev_refcnt_read);

/*
/**
* netdev_wait_allrefs - wait until all references are gone.
*
* This is called when unregistering network devices.
Expand Down
2 changes: 1 addition & 1 deletion net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -2174,7 +2174,7 @@ static int nlmsg_populate_fdb(struct sk_buff *skb,
}

/**
* ndo_dflt_fdb_dump: default netdevice operation to dump an FDB table.
* ndo_dflt_fdb_dump - default netdevice operation to dump an FDB table.
* @nlh: netlink message header
* @dev: netdevice
*
Expand Down
5 changes: 3 additions & 2 deletions net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,8 @@ struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src)
}
EXPORT_SYMBOL_GPL(skb_morph);

/* skb_copy_ubufs - copy userspace skb frags buffers to kernel
/**
* skb_copy_ubufs - copy userspace skb frags buffers to kernel
* @skb: the skb to modify
* @gfp_mask: allocation priority
*
Expand Down Expand Up @@ -2614,7 +2615,7 @@ unsigned int skb_find_text(struct sk_buff *skb, unsigned int from,
EXPORT_SYMBOL(skb_find_text);

/**
* skb_append_datato_frags: - append the user data to a skb
* skb_append_datato_frags - append the user data to a skb
* @sk: sock structure
* @skb: skb structure to be appened with user data.
* @getfrag: call back function to be used for getting the user data
Expand Down
7 changes: 5 additions & 2 deletions net/dccp/ackvec.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ static inline u8 dccp_ackvec_state(const u8 *cell)
return *cell & ~DCCPAV_MAX_RUNLEN;
}

/** struct dccp_ackvec - Ack Vector main data structure
/**
* struct dccp_ackvec - Ack Vector main data structure
*
* This implements a fixed-size circular buffer within an array and is largely
* based on Appendix A of RFC 4340.
Expand All @@ -76,7 +77,8 @@ struct dccp_ackvec {
struct list_head av_records;
};

/** struct dccp_ackvec_record - Records information about sent Ack Vectors
/**
* struct dccp_ackvec_record - Records information about sent Ack Vectors
*
* These list entries define the additional information which the HC-Receiver
* keeps about recently-sent Ack Vectors; again refer to RFC 4340, Appendix A.
Expand Down Expand Up @@ -121,6 +123,7 @@ static inline bool dccp_ackvec_is_empty(const struct dccp_ackvec *av)
* @len: length of @vec
* @nonce: whether @vec had an ECN nonce of 0 or 1
* @node: FIFO - arranged in descending order of ack_ackno
*
* This structure is used by CCIDs to access Ack Vectors in a received skb.
*/
struct dccp_ackvec_parsed {
Expand Down
1 change: 1 addition & 0 deletions net/dccp/ccid.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ bool ccid_support_check(u8 const *ccid_array, u8 array_len)
* ccid_get_builtin_ccids - Populate a list of built-in CCIDs
* @ccid_array: pointer to copy into
* @array_len: value to return length into
*
* This function allocates memory - caller must see that it is freed after use.
*/
int ccid_get_builtin_ccids(u8 **ccid_array, u8 *array_len)
Expand Down
8 changes: 6 additions & 2 deletions net/dccp/ccids/ccid3.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ static u32 ccid3_hc_tx_idle_rtt(struct ccid3_hc_tx_sock *hc, ktime_t now)
/**
* ccid3_hc_tx_update_x - Update allowed sending rate X
* @stamp: most recent time if available - can be left NULL.
*
* This function tracks draft rfc3448bis, check there for latest details.
*
* Note: X and X_recv are both stored in units of 64 * bytes/second, to support
Expand Down Expand Up @@ -161,9 +162,11 @@ static void ccid3_hc_tx_update_x(struct sock *sk, ktime_t *stamp)
}
}

/*
* Track the mean packet size `s' (cf. RFC 4342, 5.3 and RFC 3448, 4.1)
/**
* ccid3_hc_tx_update_s - Track the mean packet size `s'
* @len: DCCP packet payload size in bytes
*
* cf. RFC 4342, 5.3 and RFC 3448, 4.1
*/
static inline void ccid3_hc_tx_update_s(struct ccid3_hc_tx_sock *hc, int len)
{
Expand Down Expand Up @@ -270,6 +273,7 @@ static void ccid3_hc_tx_no_feedback_timer(unsigned long data)
/**
* ccid3_hc_tx_send_packet - Delay-based dequeueing of TX packets
* @skb: next packet candidate to send on @sk
*
* This function uses the convention of ccid_packet_dequeue_eval() and
* returns a millisecond-delay value between 0 and t_mbi = 64000 msec.
*/
Expand Down
1 change: 1 addition & 0 deletions net/dccp/ccids/lib/loss_interval.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ static inline u8 tfrc_lh_is_new_loss(struct tfrc_loss_interval *cur,
* @rh: Receive history containing a fresh loss event
* @calc_first_li: Caller-dependent routine to compute length of first interval
* @sk: Used by @calc_first_li in caller-specific way (subtyping)
*
* Updates I_mean and returns 1 if a new interval has in fact been added to @lh.
*/
int tfrc_lh_interval_add(struct tfrc_loss_hist *lh, struct tfrc_rx_hist *rh,
Expand Down
3 changes: 2 additions & 1 deletion net/dccp/ccids/lib/packet_history.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ static void __three_after_loss(struct tfrc_rx_hist *h)
* @ndp: The NDP count belonging to @skb
* @calc_first_li: Caller-dependent computation of first loss interval in @lh
* @sk: Used by @calc_first_li (see tfrc_lh_interval_add)
*
* Chooses action according to pending loss, updates LI database when a new
* loss was detected, and does required post-processing. Returns 1 when caller
* should send feedback, 0 otherwise.
Expand Down Expand Up @@ -387,7 +388,7 @@ static inline struct tfrc_rx_hist_entry *
}

/**
* tfrc_rx_hist_rtt_prev_s: previously suitable (wrt rtt_last_s) RTT-sampling entry
* tfrc_rx_hist_rtt_prev_s - previously suitable (wrt rtt_last_s) RTT-sampling entry
*/
static inline struct tfrc_rx_hist_entry *
tfrc_rx_hist_rtt_prev_s(const struct tfrc_rx_hist *h)
Expand Down
2 changes: 2 additions & 0 deletions net/dccp/ccids/lib/tfrc_equation.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ static inline u32 tfrc_binsearch(u32 fval, u8 small)
* @s: packet size in bytes
* @R: RTT scaled by 1000000 (i.e., microseconds)
* @p: loss ratio estimate scaled by 1000000
*
* Returns X_calc in bytes per second (not scaled).
*/
u32 tfrc_calc_x(u16 s, u32 R, u32 p)
Expand Down Expand Up @@ -659,6 +660,7 @@ u32 tfrc_calc_x(u16 s, u32 R, u32 p)
/**
* tfrc_calc_x_reverse_lookup - try to find p given f(p)
* @fvalue: function value to match, scaled by 1000000
*
* Returns closest match for p, also scaled by 1000000
*/
u32 tfrc_calc_x_reverse_lookup(u32 fvalue)
Expand Down
1 change: 1 addition & 0 deletions net/dccp/dccp.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ static inline int dccp_bad_service_code(const struct sock *sk,
* @dccpd_opt_len: total length of all options (5.8) in the packet
* @dccpd_seq: sequence number
* @dccpd_ack_seq: acknowledgment number subheader field value
*
* This is used for transmission as well as for reception.
*/
struct dccp_skb_cb {
Expand Down
Loading

0 comments on commit 2c53040

Please sign in to comment.