Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nilfs2: correct return value kernel-doc descriptions for the rest

Similar to the previous changes to fix return value descriptions, this
fixes the format of the return value descriptions of functions for the
rest.

Link: https://lkml.kernel.org/r/20250110010530.21872-6-konishi.ryusuke@gmail.com
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: "Brian G ." <gissf1@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Ryusuke Konishi and committed by
Andrew Morton
343d4a33 b8268501

+50 -90
+10 -14
fs/nilfs2/gcinode.c
··· 46 46 * specified by @pbn to the GC pagecache with the key @blkoff. 47 47 * This function sets @vbn (@pbn if @vbn is zero) in b_blocknr of the buffer. 48 48 * 49 - * Return Value: On success, 0 is returned. On Error, one of the following 50 - * negative error code is returned. 51 - * 52 - * %-EIO - I/O error. 53 - * 54 - * %-ENOMEM - Insufficient amount of memory available. 55 - * 56 - * %-ENOENT - The block specified with @pbn does not exist. 49 + * Return: 0 on success, or one of the following negative error codes on 50 + * failure: 51 + * * %-EIO - I/O error (including metadata corruption). 52 + * * %-ENOENT - The block specified with @pbn does not exist. 53 + * * %-ENOMEM - Insufficient memory available. 57 54 */ 58 55 int nilfs_gccache_submit_read_data(struct inode *inode, sector_t blkoff, 59 56 sector_t pbn, __u64 vbn, ··· 111 114 * specified by @vbn to the GC pagecache. @pbn can be supplied by the 112 115 * caller to avoid translation of the disk block address. 113 116 * 114 - * Return Value: On success, 0 is returned. On Error, one of the following 115 - * negative error code is returned. 116 - * 117 - * %-EIO - I/O error. 118 - * 119 - * %-ENOMEM - Insufficient amount of memory available. 117 + * Return: 0 on success, or one of the following negative error codes on 118 + * failure: 119 + * * %-EIO - I/O error (including metadata corruption). 120 + * * %-ENOENT - Invalid virtual block address. 121 + * * %-ENOMEM - Insufficient memory available. 120 122 */ 121 123 int nilfs_gccache_submit_read_node(struct inode *inode, sector_t pbn, 122 124 __u64 vbn, struct buffer_head **out_bh)
+3 -9
fs/nilfs2/inode.c
··· 598 598 * or does nothing if the inode already has it. This function allocates 599 599 * an additional inode to maintain page cache of B-tree nodes one-on-one. 600 600 * 601 - * Return Value: On success, 0 is returned. On errors, one of the following 602 - * negative error code is returned. 603 - * 604 - * %-ENOMEM - Insufficient memory available. 601 + * Return: 0 on success, or %-ENOMEM if memory is insufficient. 605 602 */ 606 603 int nilfs_attach_btree_node_cache(struct inode *inode) 607 604 { ··· 657 660 * in one inode and the one for b-tree node pages is set up in the 658 661 * other inode, which is attached to the former inode. 659 662 * 660 - * Return Value: On success, a pointer to the inode for data pages is 661 - * returned. On errors, one of the following negative error code is returned 662 - * in a pointer type. 663 - * 664 - * %-ENOMEM - Insufficient memory available. 663 + * Return: a pointer to the inode for data pages on success, or %-ENOMEM 664 + * if memory is insufficient. 665 665 */ 666 666 struct inode *nilfs_iget_for_shadow(struct inode *inode) 667 667 {
+12 -20
fs/nilfs2/recovery.c
··· 754 754 * @sb: super block instance 755 755 * @ri: pointer to a nilfs_recovery_info struct to store search results. 756 756 * 757 - * Return Value: On success, 0 is returned. On error, one of the following 758 - * negative error code is returned. 759 - * 760 - * %-EINVAL - Inconsistent filesystem state. 761 - * 762 - * %-EIO - I/O error 763 - * 764 - * %-ENOSPC - No space left on device (only in a panic state). 765 - * 766 - * %-ERESTARTSYS - Interrupted. 767 - * 768 - * %-ENOMEM - Insufficient memory available. 757 + * Return: 0 on success, or one of the following negative error codes on 758 + * failure: 759 + * * %-EINVAL - Inconsistent filesystem state. 760 + * * %-EIO - I/O error. 761 + * * %-ENOMEM - Insufficient memory available. 762 + * * %-ENOSPC - No space left on device (only in a panic state). 763 + * * %-ERESTARTSYS - Interrupted. 769 764 */ 770 765 int nilfs_salvage_orphan_logs(struct the_nilfs *nilfs, 771 766 struct super_block *sb, ··· 825 830 * segment pointed by the superblock. It sets up struct the_nilfs through 826 831 * this search. It fills nilfs_recovery_info (ri) required for recovery. 827 832 * 828 - * Return Value: On success, 0 is returned. On error, one of the following 829 - * negative error code is returned. 830 - * 831 - * %-EINVAL - No valid segment found 832 - * 833 - * %-EIO - I/O error 834 - * 835 - * %-ENOMEM - Insufficient memory available. 833 + * Return: 0 on success, or one of the following negative error codes on 834 + * failure: 835 + * * %-EINVAL - No valid segment found. 836 + * * %-EIO - I/O error. 837 + * * %-ENOMEM - Insufficient memory available. 836 838 */ 837 839 int nilfs_search_super_root(struct the_nilfs *nilfs, 838 840 struct nilfs_recovery_info *ri)
+2 -10
fs/nilfs2/segbuf.c
··· 406 406 * @segbuf: buffer storing a log to be written 407 407 * @nilfs: nilfs object 408 408 * 409 - * Return Value: On Success, 0 is returned. On Error, one of the following 410 - * negative error code is returned. 411 - * 412 - * %-EIO - I/O error 413 - * 414 - * %-ENOMEM - Insufficient memory available. 409 + * Return: Always 0. 415 410 */ 416 411 static int nilfs_segbuf_write(struct nilfs_segment_buffer *segbuf, 417 412 struct the_nilfs *nilfs) ··· 447 452 * nilfs_segbuf_wait - wait for completion of requested BIOs 448 453 * @segbuf: segment buffer 449 454 * 450 - * Return Value: On Success, 0 is returned. On Error, one of the following 451 - * negative error code is returned. 452 - * 453 - * %-EIO - I/O error 455 + * Return: 0 on success, or %-EIO if I/O error is detected. 454 456 */ 455 457 static int nilfs_segbuf_wait(struct nilfs_segment_buffer *segbuf) 456 458 {
+18 -30
fs/nilfs2/segment.c
··· 191 191 * When @vacancy_check flag is set, this function will check the amount of 192 192 * free space, and will wait for the GC to reclaim disk space if low capacity. 193 193 * 194 - * Return Value: On success, 0 is returned. On error, one of the following 195 - * negative error code is returned. 196 - * 197 - * %-ENOMEM - Insufficient memory available. 198 - * 199 - * %-ENOSPC - No space left on device 194 + * Return: 0 on success, or one of the following negative error codes on 195 + * failure: 196 + * * %-ENOMEM - Insufficient memory available. 197 + * * %-ENOSPC - No space left on device (if checking free space). 200 198 */ 201 199 int nilfs_transaction_begin(struct super_block *sb, 202 200 struct nilfs_transaction_info *ti, ··· 2312 2314 * nilfs_construct_segment - construct a logical segment 2313 2315 * @sb: super block 2314 2316 * 2315 - * Return Value: On success, 0 is returned. On errors, one of the following 2316 - * negative error code is returned. 2317 - * 2318 - * %-EROFS - Read only filesystem. 2319 - * 2320 - * %-EIO - I/O error 2321 - * 2322 - * %-ENOSPC - No space left on device (only in a panic state). 2323 - * 2324 - * %-ERESTARTSYS - Interrupted. 2325 - * 2326 - * %-ENOMEM - Insufficient memory available. 2317 + * Return: 0 on success, or one of the following negative error codes on 2318 + * failure: 2319 + * * %-EIO - I/O error (including metadata corruption). 2320 + * * %-ENOMEM - Insufficient memory available. 2321 + * * %-ENOSPC - No space left on device (only in a panic state). 2322 + * * %-ERESTARTSYS - Interrupted. 2323 + * * %-EROFS - Read only filesystem. 2327 2324 */ 2328 2325 int nilfs_construct_segment(struct super_block *sb) 2329 2326 { ··· 2342 2349 * @start: start byte offset 2343 2350 * @end: end byte offset (inclusive) 2344 2351 * 2345 - * Return Value: On success, 0 is returned. On errors, one of the following 2346 - * negative error code is returned. 2347 - * 2348 - * %-EROFS - Read only filesystem. 2349 - * 2350 - * %-EIO - I/O error 2351 - * 2352 - * %-ENOSPC - No space left on device (only in a panic state). 2353 - * 2354 - * %-ERESTARTSYS - Interrupted. 2355 - * 2356 - * %-ENOMEM - Insufficient memory available. 2352 + * Return: 0 on success, or one of the following negative error codes on 2353 + * failure: 2354 + * * %-EIO - I/O error (including metadata corruption). 2355 + * * %-ENOMEM - Insufficient memory available. 2356 + * * %-ENOSPC - No space left on device (only in a panic state). 2357 + * * %-ERESTARTSYS - Interrupted. 2358 + * * %-EROFS - Read only filesystem. 2357 2359 */ 2358 2360 int nilfs_construct_dsync_segment(struct super_block *sb, struct inode *inode, 2359 2361 loff_t start, loff_t end)
+5 -7
fs/nilfs2/the_nilfs.c
··· 49 49 * alloc_nilfs - allocate a nilfs object 50 50 * @sb: super block instance 51 51 * 52 - * Return Value: On success, pointer to the_nilfs is returned. 53 - * On error, NULL is returned. 52 + * Return: a pointer to the allocated nilfs object on success, or NULL on 53 + * failure. 54 54 */ 55 55 struct the_nilfs *alloc_nilfs(struct super_block *sb) 56 56 { ··· 200 200 * exponent information written in @sbp and stores it in @blocksize, 201 201 * or aborts with an error message if it's too large. 202 202 * 203 - * Return Value: On success, 0 is returned. If the block size is too 204 - * large, -EINVAL is returned. 203 + * Return: 0 on success, or %-EINVAL if the block size is too large. 205 204 */ 206 205 static int nilfs_get_blocksize(struct super_block *sb, 207 206 struct nilfs_super_block *sbp, int *blocksize) ··· 537 538 * area, or if the parameters themselves are not normal, it is 538 539 * determined to be invalid. 539 540 * 540 - * Return Value: true if invalid, false if valid. 541 + * Return: true if invalid, false if valid. 541 542 */ 542 543 static bool nilfs_sb2_bad_offset(struct nilfs_super_block *sbp, u64 offset) 543 544 { ··· 683 684 * reading the super block, getting disk layout information, initializing 684 685 * shared fields in the_nilfs). 685 686 * 686 - * Return Value: On success, 0 is returned. On error, a negative error 687 - * code is returned. 687 + * Return: 0 on success, or a negative error code on failure. 688 688 */ 689 689 int init_nilfs(struct the_nilfs *nilfs, struct super_block *sb) 690 690 {