diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2018-09-10 21:41:14 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-14 09:05:03 +0200 |
commit | 7dd68b147d60e5e1bcec53d0050246132dd7b9d6 (patch) | |
tree | 9e871846d5380fad18879f807e460be241f9cc00 /drivers/staging/erofs/dir.c | |
parent | 645923e441d3cc8151abd8473c29a81d0d4e07dc (diff) |
staging: erofs: use explicit unsigned int type
Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'"
detected by checkpatch.pl.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/erofs/dir.c')
-rw-r--r-- | drivers/staging/erofs/dir.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/staging/erofs/dir.c b/drivers/staging/erofs/dir.c index be6ae3b1bdbe..d1cb0d78ab84 100644 --- a/drivers/staging/erofs/dir.c +++ b/drivers/staging/erofs/dir.c @@ -24,8 +24,8 @@ static const unsigned char erofs_filetype_table[EROFS_FT_MAX] = { }; static int erofs_fill_dentries(struct dir_context *ctx, - void *dentry_blk, unsigned *ofs, - unsigned nameoff, unsigned maxsize) + void *dentry_blk, unsigned int *ofs, + unsigned int nameoff, unsigned int maxsize) { struct erofs_dirent *de = dentry_blk; const struct erofs_dirent *end = dentry_blk + nameoff; @@ -36,7 +36,7 @@ static int erofs_fill_dentries(struct dir_context *ctx, int de_namelen; unsigned char d_type; #ifdef CONFIG_EROFS_FS_DEBUG - unsigned dbg_namelen; + unsigned int dbg_namelen; unsigned char dbg_namebuf[EROFS_NAME_LEN]; #endif @@ -81,15 +81,15 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx) struct inode *dir = file_inode(f); struct address_space *mapping = dir->i_mapping; const size_t dirsize = i_size_read(dir); - unsigned i = ctx->pos / EROFS_BLKSIZ; - unsigned ofs = ctx->pos % EROFS_BLKSIZ; + unsigned int i = ctx->pos / EROFS_BLKSIZ; + unsigned int ofs = ctx->pos % EROFS_BLKSIZ; int err = 0; bool initial = true; while (ctx->pos < dirsize) { struct page *dentry_page; struct erofs_dirent *de; - unsigned nameoff, maxsize; + unsigned int nameoff, maxsize; dentry_page = read_mapping_page(mapping, i, NULL); if (IS_ERR(dentry_page)) @@ -109,7 +109,8 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx) goto skip_this; } - maxsize = min_t(unsigned, dirsize - ctx->pos + ofs, PAGE_SIZE); + maxsize = min_t(unsigned int, + dirsize - ctx->pos + ofs, PAGE_SIZE); /* search dirents at the arbitrary position */ if (unlikely(initial)) { |