Skip to content

Commit 2e62857

Browse files
konisakpm00
authored andcommitted
nilfs2: revise the return value description style for consistency.
Also for comments that do not cause kernel-doc warnings (those that list multiple error codes), revise the return value description style to match Brian G.'s suggestion of "..., or one of the following negative error codes on failure:". Link: https://lkml.kernel.org/r/CAAq45aNh1qV8P6XgDhKeNstT=PvcPUaCXsAF-f9rvmzznsZL5A@mail.gmail.com Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ryusuke Konishi <[email protected]> Cc: "Brian G ." <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent fd4e7fa commit 2e62857

File tree

7 files changed

+23
-13
lines changed

7 files changed

+23
-13
lines changed

fs/nilfs2/btnode.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ void nilfs_btnode_delete(struct buffer_head *bh)
201201
* Note that the current implementation does not support folio sizes larger
202202
* than the page size.
203203
*
204-
* Return: 0 on success, or the following negative error code on failure.
204+
* Return: 0 on success, or one of the following negative error codes on
205+
* failure:
205206
* * %-EIO - I/O error (metadata corruption).
206207
* * %-ENOMEM - Insufficient memory available.
207208
*/

fs/nilfs2/cpfile.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ static inline int nilfs_cpfile_delete_checkpoint_block(struct inode *cpfile,
236236
* stores it to the inode file given by @ifile and the nilfs root object
237237
* given by @root.
238238
*
239-
* Return: 0 on success, or the following negative error code on failure.
239+
* Return: 0 on success, or one of the following negative error codes on
240+
* failure:
240241
* * %-EINVAL - Invalid checkpoint.
241242
* * %-ENOMEM - Insufficient memory available.
242243
* * %-EIO - I/O error (including metadata corruption).
@@ -304,7 +305,8 @@ int nilfs_cpfile_read_checkpoint(struct inode *cpfile, __u64 cno,
304305
* In either case, the buffer of the block containing the checkpoint entry
305306
* and the cpfile inode are made dirty for inclusion in the write log.
306307
*
307-
* Return: 0 on success, or the following negative error code on failure.
308+
* Return: 0 on success, or one of the following negative error codes on
309+
* failure:
308310
* * %-ENOMEM - Insufficient memory available.
309311
* * %-EIO - I/O error (including metadata corruption).
310312
* * %-EROFS - Read only filesystem
@@ -373,7 +375,8 @@ int nilfs_cpfile_create_checkpoint(struct inode *cpfile, __u64 cno)
373375
* cpfile with the data given by the arguments @root, @blkinc, @ctime, and
374376
* @minor.
375377
*
376-
* Return: 0 on success, or the following negative error code on failure.
378+
* Return: 0 on success, or one of the following negative error codes on
379+
* failure:
377380
* * %-ENOMEM - Insufficient memory available.
378381
* * %-EIO - I/O error (including metadata corruption).
379382
*/
@@ -712,7 +715,7 @@ static ssize_t nilfs_cpfile_do_get_ssinfo(struct inode *cpfile, __u64 *cnop,
712715
* number to continue searching.
713716
*
714717
* Return: Count of checkpoint info items stored in the output buffer on
715-
* success, or the following negative error code on failure.
718+
* success, or one of the following negative error codes on failure:
716719
* * %-EINVAL - Invalid checkpoint mode.
717720
* * %-ENOMEM - Insufficient memory available.
718721
* * %-EIO - I/O error (including metadata corruption).
@@ -737,7 +740,8 @@ ssize_t nilfs_cpfile_get_cpinfo(struct inode *cpfile, __u64 *cnop, int mode,
737740
* @cpfile: checkpoint file inode
738741
* @cno: checkpoint number to delete
739742
*
740-
* Return: 0 on success, or the following negative error code on failure.
743+
* Return: 0 on success, or one of the following negative error codes on
744+
* failure:
741745
* * %-EBUSY - Checkpoint in use (snapshot specified).
742746
* * %-EIO - I/O error (including metadata corruption).
743747
* * %-ENOENT - No valid checkpoint found.
@@ -1005,7 +1009,7 @@ static int nilfs_cpfile_clear_snapshot(struct inode *cpfile, __u64 cno)
10051009
* @cno: checkpoint number
10061010
*
10071011
* Return: 1 if the checkpoint specified by @cno is a snapshot, 0 if not, or
1008-
* the following negative error code on failure.
1012+
* one of the following negative error codes on failure:
10091013
* * %-EIO - I/O error (including metadata corruption).
10101014
* * %-ENOENT - No such checkpoint.
10111015
* * %-ENOMEM - Insufficient memory available.

fs/nilfs2/dat.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ void nilfs_dat_abort_update(struct inode *dat,
276276
* @dat: DAT file inode
277277
* @vblocknr: virtual block number
278278
*
279-
* Return: 0 on success, or the following negative error code on failure.
279+
* Return: 0 on success, or one of the following negative error codes on
280+
* failure:
280281
* * %-EINVAL - Invalid DAT entry (internal code).
281282
* * %-EIO - I/O error (including metadata corruption).
282283
* * %-ENOMEM - Insufficient memory available.

fs/nilfs2/ifile.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ int nilfs_ifile_count_free_inodes(struct inode *ifile,
172172
* @cno: number of checkpoint entry to read
173173
* @inode_size: size of an inode
174174
*
175-
* Return: 0 on success, or the following negative error code on failure.
175+
* Return: 0 on success, or one of the following negative error codes on
176+
* failure:
176177
* * %-EINVAL - Invalid checkpoint.
177178
* * %-ENOMEM - Insufficient memory available.
178179
* * %-EIO - I/O error (including metadata corruption).

fs/nilfs2/ioctl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,8 @@ static int nilfs_ioctl_get_fslabel(struct super_block *sb, void __user *argp)
12681268
* @filp: file object
12691269
* @argp: pointer to userspace memory that contains the volume name
12701270
*
1271-
* Return: 0 on success, or the following negative error code on failure.
1271+
* Return: 0 on success, or one of the following negative error codes on
1272+
* failure:
12721273
* * %-EFAULT - Error copying input data.
12731274
* * %-EINVAL - Label length exceeds record size in superblock.
12741275
* * %-EIO - I/O error.

fs/nilfs2/segment.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,8 @@ static int nilfs_segctor_scan_file_dsync(struct nilfs_sc_info *sci,
11221122
* a super root block containing this sufile change is complete, and it can
11231123
* be canceled with nilfs_sufile_cancel_freev() until then.
11241124
*
1125-
* Return: 0 on success, or the following negative error code on failure.
1125+
* Return: 0 on success, or one of the following negative error codes on
1126+
* failure:
11261127
* * %-EINVAL - Invalid segment number.
11271128
* * %-EIO - I/O error (including metadata corruption).
11281129
* * %-ENOMEM - Insufficient memory available.
@@ -2834,7 +2835,8 @@ static void nilfs_segctor_destroy(struct nilfs_sc_info *sci)
28342835
* This allocates a log writer object, initializes it, and starts the
28352836
* log writer.
28362837
*
2837-
* Return: 0 on success, or the following negative error code on failure.
2838+
* Return: 0 on success, or one of the following negative error codes on
2839+
* failure:
28382840
* * %-EINTR - Log writer thread creation failed due to interruption.
28392841
* * %-ENOMEM - Insufficient memory available.
28402842
*/

fs/nilfs2/sufile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ int nilfs_sufile_resize(struct inode *sufile, __u64 newnsegs)
850850
* @nsi: size of suinfo array
851851
*
852852
* Return: Count of segment usage info items stored in the output buffer on
853-
* success, or the following negative error code on failure.
853+
* success, or one of the following negative error codes on failure:
854854
* * %-EIO - I/O error (including metadata corruption).
855855
* * %-ENOMEM - Insufficient memory available.
856856
*/

0 commit comments

Comments
 (0)