Skip to content

Commit c551f66

Browse files
Lee JonesAndreas Gruenbacher
authored andcommitted
gfs2: Fix a number of kernel-doc warnings
Building the kernel with W=1 results in a number of kernel-doc warnings like incorrect function names and parameter descriptions. Fix those, mostly by adding missing parameter descriptions, removing left-over descriptions, and demoting some less important kernel-doc comments into regular comments. Originally proposed by Lee Jones; improved and combined into a single patch by Andreas. Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent a4122a9 commit c551f66

File tree

17 files changed

+102
-113
lines changed

17 files changed

+102
-113
lines changed

fs/gfs2/aops.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,7 @@ int gfs2_internal_read(struct gfs2_inode *ip, char *buf, loff_t *pos,
540540

541541
/**
542542
* gfs2_readahead - Read a bunch of pages at once
543-
* @file: The file to read from
544-
* @mapping: Address space info
545-
* @pages: List of pages to read
546-
* @nr_pages: Number of pages to read
543+
* @rac: Read-ahead control structure
547544
*
548545
* Some notes:
549546
* 1. This is only for readahead, so we can simply ignore any things

fs/gfs2/bmap.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ int gfs2_iomap_alloc(struct inode *inode, loff_t pos, loff_t length,
14791479
/**
14801480
* sweep_bh_for_rgrps - find an rgrp in a meta buffer and free blocks therein
14811481
* @ip: inode
1482-
* @rg_gh: holder of resource group glock
1482+
* @rd_gh: holder of resource group glock
14831483
* @bh: buffer head to sweep
14841484
* @start: starting point in bh
14851485
* @end: end point in bh
@@ -1660,8 +1660,11 @@ static bool mp_eq_to_hgt(struct metapath *mp, __u16 *list, unsigned int h)
16601660

16611661
/**
16621662
* find_nonnull_ptr - find a non-null pointer given a metapath and height
1663+
* @sdp: The superblock
16631664
* @mp: starting metapath
16641665
* @h: desired height to search
1666+
* @end_list: See punch_hole().
1667+
* @end_aligned: See punch_hole().
16651668
*
16661669
* Assumes the metapath is valid (with buffers) out to height h.
16671670
* Returns: true if a non-null pointer was found in the metapath buffer

fs/gfs2/file.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ static int gfs2_readdir(struct file *file, struct dir_context *ctx)
118118
return error;
119119
}
120120

121-
/**
122-
* fsflag_gfs2flag
121+
/*
122+
* struct fsflag_gfs2flag
123123
*
124124
* The FS_JOURNAL_DATA_FL flag maps to GFS2_DIF_INHERIT_JDATA for directories,
125125
* and to GFS2_DIF_JDATA for non-directories.
@@ -435,7 +435,6 @@ static int gfs2_allocate_page_backing(struct page *page, unsigned int length)
435435

436436
/**
437437
* gfs2_page_mkwrite - Make a shared, mmap()ed, page writable
438-
* @vma: The virtual memory area
439438
* @vmf: The virtual memory fault containing the page to become writable
440439
*
441440
* When the page becomes writable, we need to ensure that we have
@@ -586,7 +585,7 @@ static const struct vm_operations_struct gfs2_vm_ops = {
586585
};
587586

588587
/**
589-
* gfs2_mmap -
588+
* gfs2_mmap
590589
* @file: The file to map
591590
* @vma: The VMA which described the mapping
592591
*

fs/gfs2/glock.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,8 @@ static void gfs2_holder_wake(struct gfs2_holder *gh)
359359

360360
/**
361361
* do_error - Something unexpected has happened during a lock request
362-
*
362+
* @gl: The glock
363+
* @ret: The status from the DLM
363364
*/
364365

365366
static void do_error(struct gfs2_glock *gl, const int ret)
@@ -454,8 +455,7 @@ static inline struct gfs2_holder *find_first_waiter(const struct gfs2_glock *gl)
454455
/**
455456
* state_change - record that the glock is now in a different state
456457
* @gl: the glock
457-
* @new_state the new state
458-
*
458+
* @new_state: the new state
459459
*/
460460

461461
static void state_change(struct gfs2_glock *gl, unsigned int new_state)
@@ -1268,6 +1268,8 @@ int gfs2_glock_async_wait(unsigned int num_gh, struct gfs2_holder *ghs)
12681268
* handle_callback - process a demote request
12691269
* @gl: the glock
12701270
* @state: the state the caller wants us to change to
1271+
* @delay: zero to demote immediately; otherwise pending demote
1272+
* @remote: true if this came from a different cluster node
12711273
*
12721274
* There are only two requests that we are going to see in actual
12731275
* practise: LM_ST_SHARED and LM_ST_UNLOCKED
@@ -1569,6 +1571,7 @@ static int glock_compare(const void *arg_a, const void *arg_b)
15691571
* nq_m_sync - synchonously acquire more than one glock in deadlock free order
15701572
* @num_gh: the number of structures
15711573
* @ghs: an array of struct gfs2_holder structures
1574+
* @p: placeholder for the holder structure to pass back
15721575
*
15731576
* Returns: 0 on success (all glocks acquired),
15741577
* errno on failure (no glocks acquired)
@@ -1985,7 +1988,6 @@ static void dump_glock_func(struct gfs2_glock *gl)
19851988
/**
19861989
* gfs2_gl_hash_clear - Empty out the glock hash table
19871990
* @sdp: the filesystem
1988-
* @wait: wait until it's all gone
19891991
*
19901992
* Called when unmounting the filesystem.
19911993
*/

fs/gfs2/glops.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ static void gfs2_ail_error(struct gfs2_glock *gl, const struct buffer_head *bh)
4949
* __gfs2_ail_flush - remove all buffers for a given lock from the AIL
5050
* @gl: the glock
5151
* @fsync: set when called from fsync (not all buffers will be clean)
52+
* @nr_revokes: Number of buffers to revoke
5253
*
5354
* None of the buffers should be dirty, locked, or pinned.
5455
*/
@@ -474,8 +475,7 @@ int gfs2_inode_refresh(struct gfs2_inode *ip)
474475

475476
/**
476477
* inode_go_lock - operation done after an inode lock is locked by a process
477-
* @gl: the glock
478-
* @flags:
478+
* @gh: The glock holder
479479
*
480480
* Returns: errno
481481
*/
@@ -516,7 +516,7 @@ static int inode_go_lock(struct gfs2_holder *gh)
516516
/**
517517
* inode_go_dump - print information about an inode
518518
* @seq: The iterator
519-
* @ip: the inode
519+
* @gl: The glock
520520
* @fs_id_buf: file system id (may be empty)
521521
*
522522
*/
@@ -547,9 +547,6 @@ static void inode_go_dump(struct seq_file *seq, struct gfs2_glock *gl,
547547
/**
548548
* freeze_go_sync - promote/demote the freeze glock
549549
* @gl: the glock
550-
* @state: the requested state
551-
* @flags:
552-
*
553550
*/
554551

555552
static int freeze_go_sync(struct gfs2_glock *gl)
@@ -594,9 +591,7 @@ static int freeze_go_sync(struct gfs2_glock *gl)
594591
/**
595592
* freeze_go_xmote_bh - After promoting/demoting the freeze glock
596593
* @gl: the glock
597-
*
598594
*/
599-
600595
static int freeze_go_xmote_bh(struct gfs2_glock *gl)
601596
{
602597
struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
@@ -624,7 +619,7 @@ static int freeze_go_xmote_bh(struct gfs2_glock *gl)
624619
}
625620

626621
/**
627-
* trans_go_demote_ok
622+
* freeze_go_demote_ok
628623
* @gl: the glock
629624
*
630625
* Always returns 0
@@ -638,6 +633,7 @@ static int freeze_go_demote_ok(const struct gfs2_glock *gl)
638633
/**
639634
* iopen_go_callback - schedule the dcache entry for the inode to be deleted
640635
* @gl: the glock
636+
* @remote: true if this came from a different cluster node
641637
*
642638
* gl_lockref.lock lock is held while calling this
643639
*/

fs/gfs2/inode.c

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,9 @@ struct inode *gfs2_lookup_simple(struct inode *dip, const char *name)
285285

286286
/**
287287
* gfs2_lookupi - Look up a filename in a directory and return its inode
288-
* @d_gh: An initialized holder for the directory glock
288+
* @dir: The inode of the directory containing the inode to look-up
289289
* @name: The name of the inode to look for
290290
* @is_root: If 1, ignore the caller's permissions
291-
* @i_gh: An uninitialized holder for the new inode glock
292291
*
293292
* This can be called via the VFS filldir function when NFS is doing
294293
* a readdirplus and the inode which its intending to stat isn't
@@ -476,7 +475,6 @@ static void gfs2_init_xattr(struct gfs2_inode *ip)
476475
* @dip: The directory this inode is being created in
477476
* @ip: The inode
478477
* @symname: The symlink destination (if a symlink)
479-
* @bhp: The buffer head (returned to caller)
480478
*
481479
*/
482480

@@ -514,7 +512,7 @@ static void init_dinode(struct gfs2_inode *dip, struct gfs2_inode *ip,
514512
}
515513

516514
/**
517-
* gfs2_trans_da_blocks - Calculate number of blocks to link inode
515+
* gfs2_trans_da_blks - Calculate number of blocks to link inode
518516
* @dip: The directory we are linking into
519517
* @da: The dir add information
520518
* @nr_inodes: The number of inodes involved
@@ -595,6 +593,7 @@ static int gfs2_initxattrs(struct inode *inode, const struct xattr *xattr_array,
595593
* @dev: For device nodes, this is the device number
596594
* @symname: For symlinks, this is the link destination
597595
* @size: The initial size of the inode (ignored for directories)
596+
* @excl: Force fail if inode exists
598597
*
599598
* Returns: 0 on success, or error code
600599
*/
@@ -837,9 +836,11 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
837836

838837
/**
839838
* gfs2_create - Create a file
839+
* @mnt_userns: User namespace of the mount the inode was found from
840840
* @dir: The directory in which to create the file
841841
* @dentry: The dentry of the new file
842842
* @mode: The mode of the new file
843+
* @excl: Force fail if inode exists
843844
*
844845
* Returns: errno
845846
*/
@@ -1080,8 +1081,7 @@ static int gfs2_unlink_ok(struct gfs2_inode *dip, const struct qstr *name,
10801081
/**
10811082
* gfs2_unlink_inode - Removes an inode from its parent dir and unlinks it
10821083
* @dip: The parent directory
1083-
* @name: The name of the entry in the parent directory
1084-
* @inode: The inode to be removed
1084+
* @dentry: The dentry to unlink
10851085
*
10861086
* Called with all the locks and in a transaction. This will only be
10871087
* called for a directory after it has been checked to ensure it is empty.
@@ -1199,6 +1199,7 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry)
11991199

12001200
/**
12011201
* gfs2_symlink - Create a symlink
1202+
* @mnt_userns: User namespace of the mount the inode was found from
12021203
* @dir: The directory to create the symlink in
12031204
* @dentry: The dentry to put the symlink in
12041205
* @symname: The thing which the link points to
@@ -1220,6 +1221,7 @@ static int gfs2_symlink(struct user_namespace *mnt_userns, struct inode *dir,
12201221

12211222
/**
12221223
* gfs2_mkdir - Make a directory
1224+
* @mnt_userns: User namespace of the mount the inode was found from
12231225
* @dir: The parent directory of the new one
12241226
* @dentry: The dentry of the new directory
12251227
* @mode: The mode of the new directory
@@ -1236,6 +1238,7 @@ static int gfs2_mkdir(struct user_namespace *mnt_userns, struct inode *dir,
12361238

12371239
/**
12381240
* gfs2_mknod - Make a special file
1241+
* @mnt_userns: User namespace of the mount the inode was found from
12391242
* @dir: The directory in which the special file will reside
12401243
* @dentry: The dentry of the special file
12411244
* @mode: The mode of the special file
@@ -1828,10 +1831,10 @@ static const char *gfs2_get_link(struct dentry *dentry,
18281831
}
18291832

18301833
/**
1831-
* gfs2_permission -
1834+
* gfs2_permission
1835+
* @mnt_userns: User namespace of the mount the inode was found from
18321836
* @inode: The inode
18331837
* @mask: The mask to be tested
1834-
* @flags: Indicates whether this is an RCU path walk or not
18351838
*
18361839
* This may be called from the VFS directly, or from within GFS2 with the
18371840
* inode locked, so we look to see if the glock is already locked and only
@@ -1874,14 +1877,6 @@ static int __gfs2_setattr_simple(struct inode *inode, struct iattr *attr)
18741877
return 0;
18751878
}
18761879

1877-
/**
1878-
* gfs2_setattr_simple -
1879-
* @ip:
1880-
* @attr:
1881-
*
1882-
* Returns: errno
1883-
*/
1884-
18851880
static int gfs2_setattr_simple(struct inode *inode, struct iattr *attr)
18861881
{
18871882
int error;
@@ -1962,6 +1957,7 @@ static int setattr_chown(struct inode *inode, struct iattr *attr)
19621957

19631958
/**
19641959
* gfs2_setattr - Change attributes on an inode
1960+
* @mnt_userns: User namespace of the mount the inode was found from
19651961
* @dentry: The dentry which is changing
19661962
* @attr: The structure describing the change
19671963
*

fs/gfs2/lock_dlm.c

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,31 @@
2424

2525
/**
2626
* gfs2_update_stats - Update time based stats
27-
* @mv: Pointer to mean/variance structure to update
27+
* @s: The stats to update (local or global)
28+
* @index: The index inside @s
2829
* @sample: New data to include
29-
*
30-
* @delta is the difference between the current rtt sample and the
31-
* running average srtt. We add 1/8 of that to the srtt in order to
32-
* update the current srtt estimate. The variance estimate is a bit
33-
* more complicated. We subtract the current variance estimate from
34-
* the abs value of the @delta and add 1/4 of that to the running
35-
* total. That's equivalent to 3/4 of the current variance
36-
* estimate plus 1/4 of the abs of @delta.
37-
*
38-
* Note that the index points at the array entry containing the smoothed
39-
* mean value, and the variance is always in the following entry
40-
*
41-
* Reference: TCP/IP Illustrated, vol 2, p. 831,832
42-
* All times are in units of integer nanoseconds. Unlike the TCP/IP case,
43-
* they are not scaled fixed point.
4430
*/
45-
4631
static inline void gfs2_update_stats(struct gfs2_lkstats *s, unsigned index,
4732
s64 sample)
4833
{
34+
/*
35+
* @delta is the difference between the current rtt sample and the
36+
* running average srtt. We add 1/8 of that to the srtt in order to
37+
* update the current srtt estimate. The variance estimate is a bit
38+
* more complicated. We subtract the current variance estimate from
39+
* the abs value of the @delta and add 1/4 of that to the running
40+
* total. That's equivalent to 3/4 of the current variance
41+
* estimate plus 1/4 of the abs of @delta.
42+
*
43+
* Note that the index points at the array entry containing the
44+
* smoothed mean value, and the variance is always in the following
45+
* entry
46+
*
47+
* Reference: TCP/IP Illustrated, vol 2, p. 831,832
48+
* All times are in units of integer nanoseconds. Unlike the TCP/IP
49+
* case, they are not scaled fixed point.
50+
*/
51+
4952
s64 delta = sample - s->stats[index];
5053
s->stats[index] += (delta >> 3);
5154
index++;

fs/gfs2/log.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ unsigned int gfs2_struct2blk(struct gfs2_sbd *sdp, unsigned int nstruct)
6565

6666
/**
6767
* gfs2_remove_from_ail - Remove an entry from the ail lists, updating counters
68-
* @mapping: The associated mapping (maybe NULL)
6968
* @bd: The gfs2_bufdata to remove
7069
*
7170
* The ail lock _must_ be held when calling this function
@@ -82,11 +81,11 @@ void gfs2_remove_from_ail(struct gfs2_bufdata *bd)
8281
}
8382

8483
/**
85-
* gfs2_ail1_start_one - Start I/O on a part of the AIL
86-
* @sdp: the filesystem
84+
* gfs2_ail1_start_one - Start I/O on a transaction
85+
* @sdp: The superblock
8786
* @wbc: The writeback control structure
88-
* @ai: The ail structure
89-
*
87+
* @tr: The transaction to start I/O on
88+
* @plug: The block plug currently active
9089
*/
9190

9291
static int gfs2_ail1_start_one(struct gfs2_sbd *sdp,
@@ -269,7 +268,7 @@ static void gfs2_log_update_head(struct gfs2_sbd *sdp)
269268
sdp->sd_log_head = new_head;
270269
}
271270

272-
/**
271+
/*
273272
* gfs2_ail_empty_tr - empty one of the ail lists of a transaction
274273
*/
275274

@@ -1018,7 +1017,7 @@ static void trans_drain(struct gfs2_trans *tr)
10181017

10191018
/**
10201019
* gfs2_log_flush - flush incore transaction(s)
1021-
* @sdp: the filesystem
1020+
* @sdp: The filesystem
10221021
* @gl: The glock structure to flush. If NULL, flush the whole incore log
10231022
* @flags: The log header flags: GFS2_LOG_HEAD_FLUSH_* and debug flags
10241023
*
@@ -1170,7 +1169,7 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl, u32 flags)
11701169

11711170
/**
11721171
* gfs2_merge_trans - Merge a new transaction into a cached transaction
1173-
* @old: Original transaction to be expanded
1172+
* @sdp: the filesystem
11741173
* @new: New transaction to be merged
11751174
*/
11761175

@@ -1287,7 +1286,7 @@ static inline int gfs2_ail_flush_reqd(struct gfs2_sbd *sdp)
12871286

12881287
/**
12891288
* gfs2_logd - Update log tail as Active Items get flushed to in-place blocks
1290-
* @sdp: Pointer to GFS2 superblock
1289+
* @data: Pointer to GFS2 superblock
12911290
*
12921291
* Also, periodically check to make sure that we're using the most recent
12931292
* journal index.

0 commit comments

Comments
 (0)