Skip to content

Commit

Permalink
9p: Fix a bunch of kerneldoc warnings shown up by W=1
Browse files Browse the repository at this point in the history
Fix a bunch of kerneldoc warnings shown up by W=1 in the 9p filesystem:

 (1) Add/remove/fix kerneldoc parameters descriptions.

 (2) Move __add_fid() from between v9fs_fid_add() and its comment.

 (3) 9p's caches_show() doesn't really make sense as an API function, so
     remove the kerneldoc annotation.  It's also not prefixed with 'v9fs_'.
     Also remove the kerneldoc markers from the 9p fscache wrappers.

Signed-off-by: David Howells <[email protected]>
Reviewed-by: Dominique Martinet <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
cc: Mauro Carvalho Chehab <[email protected]>
cc: [email protected]
cc: [email protected]
cc: [email protected]
Link: https://lore.kernel.org/r/163214005516.2945267.7000234432243167892.stgit@warthog.procyon.org.uk/ # rfc v1
Link: https://lore.kernel.org/r/163281899704.2790286.9177774252843775348.stgit@warthog.procyon.org.uk/ # rfc v2
  • Loading branch information
dhowells committed Oct 4, 2021
1 parent dcb442b commit bc86803
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 52 deletions.
8 changes: 4 additions & 4 deletions fs/9p/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct fscache_netfs v9fs_cache_netfs = {
.version = 0,
};

/**
/*
* v9fs_random_cachetag - Generate a random tag to be associated
* with a new cache session.
*
Expand Down Expand Up @@ -233,7 +233,7 @@ static void v9fs_vfs_readpage_complete(struct page *page, void *data,
unlock_page(page);
}

/**
/*
* __v9fs_readpage_from_fscache - read a page from cache
*
* Returns 0 if the pages are in cache and a BIO is submitted,
Expand Down Expand Up @@ -268,7 +268,7 @@ int __v9fs_readpage_from_fscache(struct inode *inode, struct page *page)
}
}

/**
/*
* __v9fs_readpages_from_fscache - read multiple pages from cache
*
* Returns 0 if the pages are in cache and a BIO is submitted,
Expand Down Expand Up @@ -308,7 +308,7 @@ int __v9fs_readpages_from_fscache(struct inode *inode,
}
}

/**
/*
* __v9fs_readpage_to_fscache - write a page to the cache
*
*/
Expand Down
14 changes: 7 additions & 7 deletions fs/9p/fid.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
#include "v9fs_vfs.h"
#include "fid.h"

static inline void __add_fid(struct dentry *dentry, struct p9_fid *fid)
{
hlist_add_head(&fid->dlist, (struct hlist_head *)&dentry->d_fsdata);
}


/**
* v9fs_fid_add - add a fid to a dentry
* @dentry: dentry that the fid is being added to
* @fid: fid to add
*
*/

static inline void __add_fid(struct dentry *dentry, struct p9_fid *fid)
{
hlist_add_head(&fid->dlist, (struct hlist_head *)&dentry->d_fsdata);
}

void v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid)
{
spin_lock(&dentry->d_lock);
Expand Down Expand Up @@ -67,7 +67,7 @@ static struct p9_fid *v9fs_fid_find_inode(struct inode *inode, kuid_t uid)

/**
* v9fs_open_fid_add - add an open fid to an inode
* @dentry: inode that the fid is being added to
* @inode: inode that the fid is being added to
* @fid: fid to add
*
*/
Expand Down
8 changes: 3 additions & 5 deletions fs/9p/v9fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ int v9fs_show_options(struct seq_file *m, struct dentry *root)
/**
* v9fs_parse_options - parse mount options into session structure
* @v9ses: existing v9fs session information
* @opts: The mount option string
*
* Return 0 upon success, -ERRNO upon failure.
*/
Expand Down Expand Up @@ -542,12 +543,9 @@ extern int v9fs_error_init(void);
static struct kobject *v9fs_kobj;

#ifdef CONFIG_9P_FSCACHE
/**
* caches_show - list caches associated with a session
*
* Returns the size of buffer written.
/*
* List caches associated with a session
*/

static ssize_t caches_show(struct kobject *kobj,
struct kobj_attribute *attr,
char *buf)
Expand Down
14 changes: 9 additions & 5 deletions fs/9p/vfs_addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@

/**
* v9fs_fid_readpage - read an entire page in from 9P
*
* @fid: fid being read
* @data: Opaque pointer to the fid being read
* @page: structure to page
*
*/
Expand Down Expand Up @@ -116,6 +115,8 @@ static int v9fs_vfs_readpages(struct file *filp, struct address_space *mapping,

/**
* v9fs_release_page - release the private state associated with a page
* @page: The page to be released
* @gfp: The caller's allocation restrictions
*
* Returns 1 if the page can be released, false otherwise.
*/
Expand All @@ -129,9 +130,9 @@ static int v9fs_release_page(struct page *page, gfp_t gfp)

/**
* v9fs_invalidate_page - Invalidate a page completely or partially
*
* @page: structure to page
* @offset: offset in the page
* @page: The page to be invalidated
* @offset: offset of the invalidated region
* @length: length of the invalidated region
*/

static void v9fs_invalidate_page(struct page *page, unsigned int offset,
Expand Down Expand Up @@ -199,6 +200,8 @@ static int v9fs_vfs_writepage(struct page *page, struct writeback_control *wbc)

/**
* v9fs_launder_page - Writeback a dirty page
* @page: The page to be cleaned up
*
* Returns 0 on success.
*/

Expand All @@ -219,6 +222,7 @@ static int v9fs_launder_page(struct page *page)
/**
* v9fs_direct_IO - 9P address space operation for direct I/O
* @iocb: target I/O control block
* @iter: The data/buffer to use
*
* The presence of v9fs_direct_IO() in the address space ops vector
* allowes open() O_DIRECT flags which would have failed otherwise.
Expand Down
33 changes: 12 additions & 21 deletions fs/9p/vfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,14 +359,11 @@ static int v9fs_file_flock_dotl(struct file *filp, int cmd,
}

/**
* v9fs_file_read - read from a file
* @filp: file pointer to read
* @udata: user data buffer to read data into
* @count: size of buffer
* @offset: offset at which to read data
* v9fs_file_read_iter - read from a file
* @iocb: The operation parameters
* @to: The buffer to read into
*
*/

static ssize_t
v9fs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
{
Expand All @@ -388,11 +385,9 @@ v9fs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
}

/**
* v9fs_file_write - write to a file
* @filp: file pointer to write
* @data: data buffer to write data from
* @count: size of buffer
* @offset: offset at which to write data
* v9fs_file_write_iter - write to a file
* @iocb: The operation parameters
* @from: The data to write
*
*/
static ssize_t
Expand Down Expand Up @@ -561,11 +556,9 @@ v9fs_vm_page_mkwrite(struct vm_fault *vmf)
}

/**
* v9fs_mmap_file_read - read from a file
* @filp: file pointer to read
* @data: user data buffer to read data into
* @count: size of buffer
* @offset: offset at which to read data
* v9fs_mmap_file_read_iter - read from a file
* @iocb: The operation parameters
* @to: The buffer to read into
*
*/
static ssize_t
Expand All @@ -576,11 +569,9 @@ v9fs_mmap_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
}

/**
* v9fs_mmap_file_write - write to a file
* @filp: file pointer to write
* @data: data buffer to write data from
* @count: size of buffer
* @offset: offset at which to write data
* v9fs_mmap_file_write_iter - write to a file
* @iocb: The operation parameters
* @from: The data to write
*
*/
static ssize_t
Expand Down
24 changes: 16 additions & 8 deletions fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ v9fs_blank_wstat(struct p9_wstat *wstat)

/**
* v9fs_alloc_inode - helper function to allocate an inode
*
* @sb: The superblock to allocate the inode from
*/
struct inode *v9fs_alloc_inode(struct super_block *sb)
{
Expand All @@ -238,7 +238,7 @@ struct inode *v9fs_alloc_inode(struct super_block *sb)

/**
* v9fs_free_inode - destroy an inode
*
* @inode: The inode to be freed
*/

void v9fs_free_inode(struct inode *inode)
Expand Down Expand Up @@ -343,7 +343,7 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses,
* v9fs_get_inode - helper function to setup an inode
* @sb: superblock
* @mode: mode to setup inode with
*
* @rdev: The device numbers to set
*/

struct inode *v9fs_get_inode(struct super_block *sb, umode_t mode, dev_t rdev)
Expand All @@ -369,7 +369,7 @@ struct inode *v9fs_get_inode(struct super_block *sb, umode_t mode, dev_t rdev)
}

/**
* v9fs_clear_inode - release an inode
* v9fs_evict_inode - Remove an inode from the inode cache
* @inode: inode to release
*
*/
Expand Down Expand Up @@ -665,14 +665,15 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir,

/**
* v9fs_vfs_create - VFS hook to create a regular file
* @mnt_userns: The user namespace of the mount
* @dir: The parent directory
* @dentry: The name of file to be created
* @mode: The UNIX file mode to set
* @excl: True if the file must not yet exist
*
* open(.., O_CREAT) is handled in v9fs_vfs_atomic_open(). This is only called
* for mknod(2).
*
* @dir: directory inode that is being created
* @dentry: dentry that is being deleted
* @mode: create permissions
*
*/

static int
Expand All @@ -696,6 +697,7 @@ v9fs_vfs_create(struct user_namespace *mnt_userns, struct inode *dir,

/**
* v9fs_vfs_mkdir - VFS mkdir hook to create a directory
* @mnt_userns: The user namespace of the mount
* @dir: inode that is being unlinked
* @dentry: dentry that is being unlinked
* @mode: mode for new directory
Expand Down Expand Up @@ -900,10 +902,12 @@ int v9fs_vfs_rmdir(struct inode *i, struct dentry *d)

/**
* v9fs_vfs_rename - VFS hook to rename an inode
* @mnt_userns: The user namespace of the mount
* @old_dir: old dir inode
* @old_dentry: old dentry
* @new_dir: new dir inode
* @new_dentry: new dentry
* @flags: RENAME_* flags
*
*/

Expand Down Expand Up @@ -1009,6 +1013,7 @@ v9fs_vfs_rename(struct user_namespace *mnt_userns, struct inode *old_dir,

/**
* v9fs_vfs_getattr - retrieve file metadata
* @mnt_userns: The user namespace of the mount
* @path: Object to query
* @stat: metadata structure to populate
* @request_mask: Mask of STATX_xxx flags indicating the caller's interests
Expand Down Expand Up @@ -1050,6 +1055,7 @@ v9fs_vfs_getattr(struct user_namespace *mnt_userns, const struct path *path,

/**
* v9fs_vfs_setattr - set file metadata
* @mnt_userns: The user namespace of the mount
* @dentry: file whose metadata to set
* @iattr: metadata assignment structure
*
Expand Down Expand Up @@ -1285,6 +1291,7 @@ static int v9fs_vfs_mkspecial(struct inode *dir, struct dentry *dentry,

/**
* v9fs_vfs_symlink - helper function to create symlinks
* @mnt_userns: The user namespace of the mount
* @dir: directory inode containing symlink
* @dentry: dentry for symlink
* @symname: symlink data
Expand Down Expand Up @@ -1340,6 +1347,7 @@ v9fs_vfs_link(struct dentry *old_dentry, struct inode *dir,

/**
* v9fs_vfs_mknod - create a special file
* @mnt_userns: The user namespace of the mount
* @dir: inode destination for new link
* @dentry: dentry for file
* @mode: mode for creation
Expand Down
11 changes: 9 additions & 2 deletions fs/9p/vfs_inode_dotl.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ v9fs_vfs_mknod_dotl(struct user_namespace *mnt_userns, struct inode *dir,
struct dentry *dentry, umode_t omode, dev_t rdev);

/**
* v9fs_get_fsgid_for_create - Helper function to get the gid for creating a
* v9fs_get_fsgid_for_create - Helper function to get the gid for a new object
* @dir_inode: The directory inode
*
* Helper function to get the gid for creating a
* new file system object. This checks the S_ISGID to determine the owning
* group of the new file system object.
*/
Expand Down Expand Up @@ -211,12 +214,13 @@ int v9fs_open_to_dotl_flags(int flags)

/**
* v9fs_vfs_create_dotl - VFS hook to create files for 9P2000.L protocol.
* @mnt_userns: The user namespace of the mount
* @dir: directory inode that is being created
* @dentry: dentry that is being deleted
* @omode: create permissions
* @excl: True if the file must not yet exist
*
*/

static int
v9fs_vfs_create_dotl(struct user_namespace *mnt_userns, struct inode *dir,
struct dentry *dentry, umode_t omode, bool excl)
Expand Down Expand Up @@ -361,6 +365,7 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,

/**
* v9fs_vfs_mkdir_dotl - VFS mkdir hook to create a directory
* @mnt_userns: The user namespace of the mount
* @dir: inode that is being unlinked
* @dentry: dentry that is being unlinked
* @omode: mode for new directory
Expand Down Expand Up @@ -537,6 +542,7 @@ static int v9fs_mapped_iattr_valid(int iattr_valid)

/**
* v9fs_vfs_setattr_dotl - set file metadata
* @mnt_userns: The user namespace of the mount
* @dentry: file whose metadata to set
* @iattr: metadata assignment structure
*
Expand Down Expand Up @@ -816,6 +822,7 @@ v9fs_vfs_link_dotl(struct dentry *old_dentry, struct inode *dir,

/**
* v9fs_vfs_mknod_dotl - create a special file
* @mnt_userns: The user namespace of the mount
* @dir: inode destination for new link
* @dentry: dentry for file
* @omode: mode for creation
Expand Down

0 comments on commit bc86803

Please sign in to comment.