Commit 637b77fd authored by Randy Dunlap's avatar Randy Dunlap Committed by Jakub Kicinski

net/tipc: fix all function Return: notation

Fix Return: kernel-doc notation in all net/tipc/ source files.
Also keep ReST list notation intact for output formatting.
Fix a few typos in comments.
Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f172f4b8
...@@ -132,7 +132,7 @@ int tipc_media_addr_printf(char *buf, int len, struct tipc_media_addr *a) ...@@ -132,7 +132,7 @@ int tipc_media_addr_printf(char *buf, int len, struct tipc_media_addr *a)
* @name: ptr to bearer name string * @name: ptr to bearer name string
* @name_parts: ptr to area for bearer name components (or NULL if not needed) * @name_parts: ptr to area for bearer name components (or NULL if not needed)
* *
* Returns 1 if bearer name is valid, otherwise 0. * Return: 1 if bearer name is valid, otherwise 0.
*/ */
static int bearer_name_validate(const char *name, static int bearer_name_validate(const char *name,
struct tipc_bearer_names *name_parts) struct tipc_bearer_names *name_parts)
......
...@@ -721,9 +721,9 @@ static void *tipc_aead_mem_alloc(struct crypto_aead *tfm, ...@@ -721,9 +721,9 @@ static void *tipc_aead_mem_alloc(struct crypto_aead *tfm,
* @__dnode: TIPC dest node if "known" * @__dnode: TIPC dest node if "known"
* *
* Return: * Return:
* 0 : if the encryption has completed * * 0 : if the encryption has completed
* -EINPROGRESS/-EBUSY : if a callback will be performed * * -EINPROGRESS/-EBUSY : if a callback will be performed
* < 0 : the encryption has failed * * < 0 : the encryption has failed
*/ */
static int tipc_aead_encrypt(struct tipc_aead *aead, struct sk_buff *skb, static int tipc_aead_encrypt(struct tipc_aead *aead, struct sk_buff *skb,
struct tipc_bearer *b, struct tipc_bearer *b,
...@@ -877,9 +877,9 @@ static void tipc_aead_encrypt_done(struct crypto_async_request *base, int err) ...@@ -877,9 +877,9 @@ static void tipc_aead_encrypt_done(struct crypto_async_request *base, int err)
* @b: TIPC bearer where the message has been received * @b: TIPC bearer where the message has been received
* *
* Return: * Return:
* 0 : if the decryption has completed * * 0 : if the decryption has completed
* -EINPROGRESS/-EBUSY : if a callback will be performed * * -EINPROGRESS/-EBUSY : if a callback will be performed
* < 0 : the decryption has failed * * < 0 : the decryption has failed
*/ */
static int tipc_aead_decrypt(struct net *net, struct tipc_aead *aead, static int tipc_aead_decrypt(struct net *net, struct tipc_aead *aead,
struct sk_buff *skb, struct tipc_bearer *b) struct sk_buff *skb, struct tipc_bearer *b)
...@@ -1008,7 +1008,7 @@ static inline int tipc_ehdr_size(struct tipc_ehdr *ehdr) ...@@ -1008,7 +1008,7 @@ static inline int tipc_ehdr_size(struct tipc_ehdr *ehdr)
* tipc_ehdr_validate - Validate an encryption message * tipc_ehdr_validate - Validate an encryption message
* @skb: the message buffer * @skb: the message buffer
* *
* Returns "true" if this is a valid encryption message, otherwise "false" * Return: "true" if this is a valid encryption message, otherwise "false"
*/ */
bool tipc_ehdr_validate(struct sk_buff *skb) bool tipc_ehdr_validate(struct sk_buff *skb)
{ {
...@@ -1681,12 +1681,12 @@ static inline void tipc_crypto_clone_msg(struct net *net, struct sk_buff *_skb, ...@@ -1681,12 +1681,12 @@ static inline void tipc_crypto_clone_msg(struct net *net, struct sk_buff *_skb,
* Otherwise, the skb is freed! * Otherwise, the skb is freed!
* *
* Return: * Return:
* 0 : the encryption has succeeded (or no encryption) * * 0 : the encryption has succeeded (or no encryption)
* -EINPROGRESS/-EBUSY : the encryption is ongoing, a callback will be made * * -EINPROGRESS/-EBUSY : the encryption is ongoing, a callback will be made
* -ENOKEK : the encryption has failed due to no key * * -ENOKEK : the encryption has failed due to no key
* -EKEYREVOKED : the encryption has failed due to key revoked * * -EKEYREVOKED : the encryption has failed due to key revoked
* -ENOMEM : the encryption has failed due to no memory * * -ENOMEM : the encryption has failed due to no memory
* < 0 : the encryption has failed due to other reasons * * < 0 : the encryption has failed due to other reasons
*/ */
int tipc_crypto_xmit(struct net *net, struct sk_buff **skb, int tipc_crypto_xmit(struct net *net, struct sk_buff **skb,
struct tipc_bearer *b, struct tipc_media_addr *dst, struct tipc_bearer *b, struct tipc_media_addr *dst,
...@@ -1806,12 +1806,12 @@ int tipc_crypto_xmit(struct net *net, struct sk_buff **skb, ...@@ -1806,12 +1806,12 @@ int tipc_crypto_xmit(struct net *net, struct sk_buff **skb,
* cluster key(s) can be taken for decryption (- recursive). * cluster key(s) can be taken for decryption (- recursive).
* *
* Return: * Return:
* 0 : the decryption has successfully completed * * 0 : the decryption has successfully completed
* -EINPROGRESS/-EBUSY : the decryption is ongoing, a callback will be made * * -EINPROGRESS/-EBUSY : the decryption is ongoing, a callback will be made
* -ENOKEY : the decryption has failed due to no key * * -ENOKEY : the decryption has failed due to no key
* -EBADMSG : the decryption has failed due to bad message * * -EBADMSG : the decryption has failed due to bad message
* -ENOMEM : the decryption has failed due to no memory * * -ENOMEM : the decryption has failed due to no memory
* < 0 : the decryption has failed due to other reasons * * < 0 : the decryption has failed due to other reasons
*/ */
int tipc_crypto_rcv(struct net *net, struct tipc_crypto *rx, int tipc_crypto_rcv(struct net *net, struct tipc_crypto *rx,
struct sk_buff **skb, struct tipc_bearer *b) struct sk_buff **skb, struct tipc_bearer *b)
......
...@@ -342,7 +342,7 @@ static void tipc_disc_timeout(struct timer_list *t) ...@@ -342,7 +342,7 @@ static void tipc_disc_timeout(struct timer_list *t)
* @dest: destination address for request messages * @dest: destination address for request messages
* @skb: pointer to created frame * @skb: pointer to created frame
* *
* Returns 0 if successful, otherwise -errno. * Return: 0 if successful, otherwise -errno.
*/ */
int tipc_disc_create(struct net *net, struct tipc_bearer *b, int tipc_disc_create(struct net *net, struct tipc_bearer *b,
struct tipc_media_addr *dest, struct sk_buff **skb) struct tipc_media_addr *dest, struct sk_buff **skb)
......
...@@ -488,7 +488,7 @@ u32 tipc_link_state(struct tipc_link *l) ...@@ -488,7 +488,7 @@ u32 tipc_link_state(struct tipc_link *l)
* @self: local unicast link id * @self: local unicast link id
* @peer_id: 128-bit ID of peer * @peer_id: 128-bit ID of peer
* *
* Returns true if link was created, otherwise false * Return: true if link was created, otherwise false
*/ */
bool tipc_link_create(struct net *net, char *if_name, int bearer_id, bool tipc_link_create(struct net *net, char *if_name, int bearer_id,
int tolerance, char net_plane, u32 mtu, int priority, int tolerance, char net_plane, u32 mtu, int priority,
...@@ -567,7 +567,7 @@ bool tipc_link_create(struct net *net, char *if_name, int bearer_id, ...@@ -567,7 +567,7 @@ bool tipc_link_create(struct net *net, char *if_name, int bearer_id,
* @peer_caps: bitmap describing peer node capabilities * @peer_caps: bitmap describing peer node capabilities
* @bc_sndlink: the namespace global link used for broadcast sending * @bc_sndlink: the namespace global link used for broadcast sending
* *
* Returns true if link was created, otherwise false * Return: true if link was created, otherwise false
*/ */
bool tipc_link_bc_create(struct net *net, u32 ownnode, u32 peer, u8 *peer_id, bool tipc_link_bc_create(struct net *net, u32 ownnode, u32 peer, u8 *peer_id,
int mtu, u32 min_win, u32 max_win, u16 peer_caps, int mtu, u32 min_win, u32 max_win, u16 peer_caps,
...@@ -822,7 +822,7 @@ static void link_profile_stats(struct tipc_link *l) ...@@ -822,7 +822,7 @@ static void link_profile_stats(struct tipc_link *l)
* tipc_link_too_silent - check if link is "too silent" * tipc_link_too_silent - check if link is "too silent"
* @l: tipc link to be checked * @l: tipc link to be checked
* *
* Returns true if the link 'silent_intv_cnt' is about to reach the * Return: true if the link 'silent_intv_cnt' is about to reach the
* 'abort_limit' value, otherwise false * 'abort_limit' value, otherwise false
*/ */
bool tipc_link_too_silent(struct tipc_link *l) bool tipc_link_too_silent(struct tipc_link *l)
...@@ -1024,8 +1024,8 @@ void tipc_link_reset(struct tipc_link *l) ...@@ -1024,8 +1024,8 @@ void tipc_link_reset(struct tipc_link *l)
* @xmitq: returned list of packets to be sent by caller * @xmitq: returned list of packets to be sent by caller
* *
* Consumes the buffer chain. * Consumes the buffer chain.
* Returns 0 if success, or errno: -ELINKCONG, -EMSGSIZE or -ENOBUFS
* Messages at TIPC_SYSTEM_IMPORTANCE are always accepted * Messages at TIPC_SYSTEM_IMPORTANCE are always accepted
* Return: 0 if success, or errno: -ELINKCONG, -EMSGSIZE or -ENOBUFS
*/ */
int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list, int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
struct sk_buff_head *xmitq) struct sk_buff_head *xmitq)
......
...@@ -60,7 +60,7 @@ static unsigned int align(unsigned int i) ...@@ -60,7 +60,7 @@ static unsigned int align(unsigned int i)
* @size: message size (including TIPC header) * @size: message size (including TIPC header)
* @gfp: memory allocation flags * @gfp: memory allocation flags
* *
* Returns a new buffer with data pointers set to the specified size. * Return: a new buffer with data pointers set to the specified size.
* *
* NOTE: * NOTE:
* Headroom is reserved to allow prepending of a data link header. * Headroom is reserved to allow prepending of a data link header.
...@@ -209,8 +209,9 @@ int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf) ...@@ -209,8 +209,9 @@ int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf)
* @m: the data to be appended * @m: the data to be appended
* @mss: max allowable size of buffer * @mss: max allowable size of buffer
* @dlen: size of data to be appended * @dlen: size of data to be appended
* @txq: queue to appand to * @txq: queue to append to
* Returns the number og 1k blocks appended or errno value *
* Return: the number of 1k blocks appended or errno value
*/ */
int tipc_msg_append(struct tipc_msg *_hdr, struct msghdr *m, int dlen, int tipc_msg_append(struct tipc_msg *_hdr, struct msghdr *m, int dlen,
int mss, struct sk_buff_head *txq) int mss, struct sk_buff_head *txq)
...@@ -314,7 +315,7 @@ bool tipc_msg_validate(struct sk_buff **_skb) ...@@ -314,7 +315,7 @@ bool tipc_msg_validate(struct sk_buff **_skb)
* @pktmax: max size of a fragment incl. the header * @pktmax: max size of a fragment incl. the header
* @frags: returned fragment skb list * @frags: returned fragment skb list
* *
* Returns 0 if the fragmentation is successful, otherwise: -EINVAL * Return: 0 if the fragmentation is successful, otherwise: -EINVAL
* or -ENOMEM * or -ENOMEM
*/ */
int tipc_msg_fragment(struct sk_buff *skb, const struct tipc_msg *hdr, int tipc_msg_fragment(struct sk_buff *skb, const struct tipc_msg *hdr,
...@@ -377,7 +378,7 @@ int tipc_msg_fragment(struct sk_buff *skb, const struct tipc_msg *hdr, ...@@ -377,7 +378,7 @@ int tipc_msg_fragment(struct sk_buff *skb, const struct tipc_msg *hdr,
* Note that the recursive call we are making here is safe, since it can * Note that the recursive call we are making here is safe, since it can
* logically go only one further level down. * logically go only one further level down.
* *
* Returns message data size or errno: -ENOMEM, -EFAULT * Return: message data size or errno: -ENOMEM, -EFAULT
*/ */
int tipc_msg_build(struct tipc_msg *mhdr, struct msghdr *m, int offset, int tipc_msg_build(struct tipc_msg *mhdr, struct msghdr *m, int offset,
int dsz, int pktmax, struct sk_buff_head *list) int dsz, int pktmax, struct sk_buff_head *list)
...@@ -488,7 +489,7 @@ int tipc_msg_build(struct tipc_msg *mhdr, struct msghdr *m, int offset, ...@@ -488,7 +489,7 @@ int tipc_msg_build(struct tipc_msg *mhdr, struct msghdr *m, int offset,
* @msg: message to be appended * @msg: message to be appended
* @max: max allowable size for the bundle buffer * @max: max allowable size for the bundle buffer
* *
* Returns "true" if bundling has been performed, otherwise "false" * Return: "true" if bundling has been performed, otherwise "false"
*/ */
static bool tipc_msg_bundle(struct sk_buff *bskb, struct tipc_msg *msg, static bool tipc_msg_bundle(struct sk_buff *bskb, struct tipc_msg *msg,
u32 max) u32 max)
...@@ -585,7 +586,7 @@ bool tipc_msg_try_bundle(struct sk_buff *tskb, struct sk_buff **skb, u32 mss, ...@@ -585,7 +586,7 @@ bool tipc_msg_try_bundle(struct sk_buff *tskb, struct sk_buff **skb, u32 mss,
* @pos: position in outer message of msg to be extracted. * @pos: position in outer message of msg to be extracted.
* Returns position of next msg. * Returns position of next msg.
* Consumes outer buffer when last packet extracted * Consumes outer buffer when last packet extracted
* Returns true when there is an extracted buffer, otherwise false * Return: true when there is an extracted buffer, otherwise false
*/ */
bool tipc_msg_extract(struct sk_buff *skb, struct sk_buff **iskb, int *pos) bool tipc_msg_extract(struct sk_buff *skb, struct sk_buff **iskb, int *pos)
{ {
...@@ -629,7 +630,7 @@ bool tipc_msg_extract(struct sk_buff *skb, struct sk_buff **iskb, int *pos) ...@@ -629,7 +630,7 @@ bool tipc_msg_extract(struct sk_buff *skb, struct sk_buff **iskb, int *pos)
* @skb: buffer containing message to be reversed; will be consumed * @skb: buffer containing message to be reversed; will be consumed
* @err: error code to be set in message, if any * @err: error code to be set in message, if any
* Replaces consumed buffer with new one when successful * Replaces consumed buffer with new one when successful
* Returns true if success, otherwise false * Return: true if success, otherwise false
*/ */
bool tipc_msg_reverse(u32 own_node, struct sk_buff **skb, int err) bool tipc_msg_reverse(u32 own_node, struct sk_buff **skb, int err)
{ {
...@@ -705,7 +706,7 @@ bool tipc_msg_skb_clone(struct sk_buff_head *msg, struct sk_buff_head *cpy) ...@@ -705,7 +706,7 @@ bool tipc_msg_skb_clone(struct sk_buff_head *msg, struct sk_buff_head *cpy)
* @skb: the buffer containing the message. * @skb: the buffer containing the message.
* @err: error code to be used by caller if lookup fails * @err: error code to be used by caller if lookup fails
* Does not consume buffer * Does not consume buffer
* Returns true if a destination is found, false otherwise * Return: true if a destination is found, false otherwise
*/ */
bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb, int *err) bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb, int *err)
{ {
......
...@@ -287,7 +287,7 @@ void tipc_publ_notify(struct net *net, struct list_head *nsub_list, ...@@ -287,7 +287,7 @@ void tipc_publ_notify(struct net *net, struct list_head *nsub_list,
* @dtype: name distributor message type * @dtype: name distributor message type
* *
* tipc_nametbl_lock must be held. * tipc_nametbl_lock must be held.
* Returns the publication item if successful, otherwise NULL. * Return: the publication item if successful, otherwise NULL.
*/ */
static bool tipc_update_nametbl(struct net *net, struct distr_item *i, static bool tipc_update_nametbl(struct net *net, struct distr_item *i,
u32 node, u32 dtype) u32 node, u32 dtype)
......
...@@ -1552,7 +1552,7 @@ static void node_lost_contact(struct tipc_node *n, ...@@ -1552,7 +1552,7 @@ static void node_lost_contact(struct tipc_node *n,
* @linkname: link name output buffer * @linkname: link name output buffer
* @len: size of @linkname output buffer * @len: size of @linkname output buffer
* *
* Returns 0 on success * Return: 0 on success
*/ */
int tipc_node_get_linkname(struct net *net, u32 bearer_id, u32 addr, int tipc_node_get_linkname(struct net *net, u32 bearer_id, u32 addr,
char *linkname, size_t len) char *linkname, size_t len)
...@@ -1671,7 +1671,7 @@ static void tipc_lxc_xmit(struct net *peer_net, struct sk_buff_head *list) ...@@ -1671,7 +1671,7 @@ static void tipc_lxc_xmit(struct net *peer_net, struct sk_buff_head *list)
* @dnode: address of destination node * @dnode: address of destination node
* @selector: a number used for deterministic link selection * @selector: a number used for deterministic link selection
* Consumes the buffer chain. * Consumes the buffer chain.
* Returns 0 if success, otherwise: -ELINKCONG,-EHOSTUNREACH,-EMSGSIZE,-ENOBUF * Return: 0 if success, otherwise: -ELINKCONG,-EHOSTUNREACH,-EMSGSIZE,-ENOBUF
*/ */
int tipc_node_xmit(struct net *net, struct sk_buff_head *list, int tipc_node_xmit(struct net *net, struct sk_buff_head *list,
u32 dnode, int selector) u32 dnode, int selector)
...@@ -1908,7 +1908,7 @@ static void tipc_node_bc_rcv(struct net *net, struct sk_buff *skb, int bearer_id ...@@ -1908,7 +1908,7 @@ static void tipc_node_bc_rcv(struct net *net, struct sk_buff *skb, int bearer_id
* @skb: TIPC packet * @skb: TIPC packet
* @bearer_id: identity of bearer delivering the packet * @bearer_id: identity of bearer delivering the packet
* @xmitq: queue for messages to be xmited on * @xmitq: queue for messages to be xmited on
* Returns true if state and msg are ok, otherwise false * Return: true if state and msg are ok, otherwise false
*/ */
static bool tipc_node_check_state(struct tipc_node *n, struct sk_buff *skb, static bool tipc_node_check_state(struct tipc_node *n, struct sk_buff *skb,
int bearer_id, struct sk_buff_head *xmitq) int bearer_id, struct sk_buff_head *xmitq)
......
This diff is collapsed.
...@@ -61,7 +61,7 @@ static void tipc_sub_send_event(struct tipc_subscription *sub, ...@@ -61,7 +61,7 @@ static void tipc_sub_send_event(struct tipc_subscription *sub,
* @found_lower: lower value to test * @found_lower: lower value to test
* @found_upper: upper value to test * @found_upper: upper value to test
* *
* Returns 1 if there is overlap, otherwise 0. * Return: 1 if there is overlap, otherwise 0.
*/ */
int tipc_sub_check_overlap(struct tipc_service_range *seq, u32 found_lower, int tipc_sub_check_overlap(struct tipc_service_range *seq, u32 found_lower,
u32 found_upper) u32 found_upper)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment