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 sufile

Similar to the previous changes to fix return value descriptions, this
fixes the format of the return value descriptions of functions for
sufile-related functions, eliminating a dozen warnings emitted by the
kernel-doc script.

Link: https://lkml.kernel.org/r/20250110010530.21872-4-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
d33544ad e4a99d48

+45 -73
+39 -63
fs/nilfs2/sufile.c
··· 155 155 * of successfully modified segments from the head is stored in the 156 156 * place @ndone points to. 157 157 * 158 - * Return Value: On success, zero is returned. On error, one of the 159 - * following negative error codes is returned. 160 - * 161 - * %-EIO - I/O error. 162 - * 163 - * %-ENOMEM - Insufficient amount of memory available. 164 - * 165 - * %-ENOENT - Given segment usage is in hole block (may be returned if 166 - * @create is zero) 167 - * 168 - * %-EINVAL - Invalid segment usage number 158 + * Return: 0 on success, or one of the following negative error codes on 159 + * failure: 160 + * * %-EINVAL - Invalid segment usage number 161 + * * %-EIO - I/O error (including metadata corruption). 162 + * * %-ENOENT - Given segment usage is in hole block (may be returned if 163 + * @create is zero) 164 + * * %-ENOMEM - Insufficient memory available. 169 165 */ 170 166 int nilfs_sufile_updatev(struct inode *sufile, __u64 *segnumv, size_t nsegs, 171 167 int create, size_t *ndone, ··· 268 272 * @start: minimum segment number of allocatable region (inclusive) 269 273 * @end: maximum segment number of allocatable region (inclusive) 270 274 * 271 - * Return Value: On success, 0 is returned. On error, one of the 272 - * following negative error codes is returned. 273 - * 274 - * %-ERANGE - invalid segment region 275 + * Return: 0 on success, or %-ERANGE if segment range is invalid. 275 276 */ 276 277 int nilfs_sufile_set_alloc_range(struct inode *sufile, __u64 start, __u64 end) 277 278 { ··· 293 300 * @sufile: inode of segment usage file 294 301 * @segnump: pointer to segment number 295 302 * 296 - * Description: nilfs_sufile_alloc() allocates a clean segment. 303 + * Description: nilfs_sufile_alloc() allocates a clean segment, and stores 304 + * its segment number in the place pointed to by @segnump. 297 305 * 298 - * Return Value: On success, 0 is returned and the segment number of the 299 - * allocated segment is stored in the place pointed by @segnump. On error, one 300 - * of the following negative error codes is returned. 301 - * 302 - * %-EIO - I/O error. 303 - * 304 - * %-ENOMEM - Insufficient amount of memory available. 305 - * 306 - * %-ENOSPC - No clean segment left. 306 + * Return: 0 on success, or one of the following negative error codes on 307 + * failure: 308 + * * %-EIO - I/O error (including metadata corruption). 309 + * * %-ENOMEM - Insufficient memory available. 310 + * * %-ENOSPC - No clean segment left. 307 311 */ 308 312 int nilfs_sufile_alloc(struct inode *sufile, __u64 *segnump) 309 313 { ··· 600 610 * @sufile: inode of segment usage file 601 611 * @sustat: pointer to a structure of segment usage statistics 602 612 * 603 - * Description: nilfs_sufile_get_stat() returns information about segment 604 - * usage. 613 + * Description: nilfs_sufile_get_stat() retrieves segment usage statistics 614 + * and stores them in the location pointed to by @sustat. 605 615 * 606 - * Return Value: On success, 0 is returned, and segment usage information is 607 - * stored in the place pointed by @sustat. On error, one of the following 608 - * negative error codes is returned. 609 - * 610 - * %-EIO - I/O error. 611 - * 612 - * %-ENOMEM - Insufficient amount of memory available. 616 + * Return: 0 on success, or one of the following negative error codes on 617 + * failure: 618 + * * %-EIO - I/O error (including metadata corruption). 619 + * * %-ENOMEM - Insufficient memory available. 613 620 */ 614 621 int nilfs_sufile_get_stat(struct inode *sufile, struct nilfs_sustat *sustat) 615 622 { ··· 670 683 * @start: start segment number (inclusive) 671 684 * @end: end segment number (inclusive) 672 685 * 673 - * Return Value: On success, 0 is returned. On error, one of the 674 - * following negative error codes is returned. 675 - * 676 - * %-EIO - I/O error. 677 - * 678 - * %-ENOMEM - Insufficient amount of memory available. 679 - * 680 - * %-EINVAL - Invalid number of segments specified 681 - * 682 - * %-EBUSY - Dirty or active segments are present in the range 686 + * Return: 0 on success, or one of the following negative error codes on 687 + * failure: 688 + * * %-EBUSY - Dirty or active segments are present in the range. 689 + * * %-EINVAL - Invalid number of segments specified. 690 + * * %-EIO - I/O error (including metadata corruption). 691 + * * %-ENOMEM - Insufficient memory available. 683 692 */ 684 693 static int nilfs_sufile_truncate_range(struct inode *sufile, 685 694 __u64 start, __u64 end) ··· 770 787 * @sufile: inode of segment usage file 771 788 * @newnsegs: new number of segments 772 789 * 773 - * Return Value: On success, 0 is returned. On error, one of the 774 - * following negative error codes is returned. 775 - * 776 - * %-EIO - I/O error. 777 - * 778 - * %-ENOMEM - Insufficient amount of memory available. 779 - * 780 - * %-ENOSPC - Enough free space is not left for shrinking 781 - * 782 - * %-EBUSY - Dirty or active segments exist in the region to be truncated 790 + * Return: 0 on success, or one of the following negative error codes on 791 + * failure: 792 + * * %-EBUSY - Dirty or active segments exist in the region to be truncated. 793 + * * %-EIO - I/O error (including metadata corruption). 794 + * * %-ENOMEM - Insufficient memory available. 795 + * * %-ENOSPC - Enough free space is not left for shrinking. 783 796 */ 784 797 int nilfs_sufile_resize(struct inode *sufile, __u64 newnsegs) 785 798 { ··· 918 939 * segment usage accordingly. Only the fields indicated by the sup_flags 919 940 * are updated. 920 941 * 921 - * Return Value: On success, 0 is returned. On error, one of the 922 - * following negative error codes is returned. 923 - * 924 - * %-EIO - I/O error. 925 - * 926 - * %-ENOMEM - Insufficient amount of memory available. 927 - * 928 - * %-EINVAL - Invalid values in input (segment number, flags or nblocks) 942 + * Return: 0 on success, or one of the following negative error codes on 943 + * failure: 944 + * * %-EINVAL - Invalid values in input (segment number, flags or nblocks). 945 + * * %-EIO - I/O error (including metadata corruption). 946 + * * %-ENOMEM - Insufficient memory available. 929 947 */ 930 948 ssize_t nilfs_sufile_set_suinfo(struct inode *sufile, void *buf, 931 949 unsigned int supsz, size_t nsup) ··· 1049 1073 * and start+len is rounded down. For each clean segment blkdev_issue_discard 1050 1074 * function is invoked. 1051 1075 * 1052 - * Return Value: On success, 0 is returned or negative error code, otherwise. 1076 + * Return: 0 on success, or a negative error code on failure. 1053 1077 */ 1054 1078 int nilfs_sufile_trim_fs(struct inode *sufile, struct fstrim_range *range) 1055 1079 {
+6 -10
fs/nilfs2/sufile.h
··· 95 95 * @nsegs: size of @segnumv array 96 96 * @ndone: place to store the number of cancelled segments 97 97 * 98 - * Return Value: On success, 0 is returned. On error, a negative error codes 99 - * is returned. 98 + * Return: 0 on success, or a negative error code on failure. 100 99 */ 101 100 static inline int nilfs_sufile_cancel_freev(struct inode *sufile, 102 101 __u64 *segnumv, size_t nsegs, ··· 113 114 * Description: nilfs_sufile_set_error() marks the segment specified by 114 115 * @segnum as erroneous. The error segment will never be used again. 115 116 * 116 - * Return Value: On success, 0 is returned. On error, one of the following 117 - * negative error codes is returned. 118 - * 119 - * %-EIO - I/O error. 120 - * 121 - * %-ENOMEM - Insufficient amount of memory available. 122 - * 123 - * %-EINVAL - Invalid segment usage number. 117 + * Return: 0 on success, or one of the following negative error codes on 118 + * failure: 119 + * * %-EINVAL - Invalid segment usage number. 120 + * * %-EIO - I/O error (including metadata corruption). 121 + * * %-ENOMEM - Insufficient memory available. 124 122 */ 125 123 static inline int nilfs_sufile_set_error(struct inode *sufile, __u64 segnum) 126 124 {