Commit e82a9a17 authored by Pratik Shinde's avatar Pratik Shinde Committed by Greg Kroah-Hartman

staging: erofs:converting all 'unsigned' to 'unsigned int'

Fixed checkpatch warnings: converting all 'unsigned' to 'unsigned int'
Signed-off-by: default avatarPratik Shinde <pratikshinde320@gmail.com>
Reviewed-by: default avatarGao Xiang <gaoxiang25@huawei.com>
Link: https://lore.kernel.org/r/20190715122127.13733-1-pratikshinde320@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e1928327
...@@ -359,8 +359,8 @@ struct erofs_vnode { ...@@ -359,8 +359,8 @@ struct erofs_vnode {
unsigned char inode_isize; unsigned char inode_isize;
unsigned short xattr_isize; unsigned short xattr_isize;
unsigned xattr_shared_count; unsigned int xattr_shared_count;
unsigned *xattr_shared_xattrs; unsigned int *xattr_shared_xattrs;
union { union {
erofs_blk_t raw_blkaddr; erofs_blk_t raw_blkaddr;
...@@ -510,7 +510,8 @@ erofs_grab_bio(struct super_block *sb, ...@@ -510,7 +510,8 @@ erofs_grab_bio(struct super_block *sb,
return bio; return bio;
} }
static inline void __submit_bio(struct bio *bio, unsigned op, unsigned op_flags) static inline void __submit_bio(struct bio *bio, unsigned int op,
unsigned int op_flags)
{ {
bio_set_op_attrs(bio, op, op_flags); bio_set_op_attrs(bio, op, op_flags);
submit_bio(bio); submit_bio(bio);
......
...@@ -54,9 +54,9 @@ static inline void z_erofs_pagevec_ctor_exit(struct z_erofs_pagevec_ctor *ctor, ...@@ -54,9 +54,9 @@ static inline void z_erofs_pagevec_ctor_exit(struct z_erofs_pagevec_ctor *ctor,
static inline struct page * static inline struct page *
z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor, z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor,
unsigned nr) unsigned int nr)
{ {
unsigned index; unsigned int index;
/* keep away from occupied pages */ /* keep away from occupied pages */
if (ctor->next) if (ctor->next)
...@@ -64,7 +64,7 @@ z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor, ...@@ -64,7 +64,7 @@ z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor,
for (index = 0; index < nr; ++index) { for (index = 0; index < nr; ++index) {
const erofs_vtptr_t t = ctor->pages[index]; const erofs_vtptr_t t = ctor->pages[index];
const unsigned tags = tagptr_unfold_tags(t); const unsigned int tags = tagptr_unfold_tags(t);
if (tags == Z_EROFS_PAGE_TYPE_EXCLUSIVE) if (tags == Z_EROFS_PAGE_TYPE_EXCLUSIVE)
return tagptr_unfold_ptr(t); return tagptr_unfold_ptr(t);
...@@ -91,8 +91,9 @@ z_erofs_pagevec_ctor_pagedown(struct z_erofs_pagevec_ctor *ctor, ...@@ -91,8 +91,9 @@ z_erofs_pagevec_ctor_pagedown(struct z_erofs_pagevec_ctor *ctor,
} }
static inline void z_erofs_pagevec_ctor_init(struct z_erofs_pagevec_ctor *ctor, static inline void z_erofs_pagevec_ctor_init(struct z_erofs_pagevec_ctor *ctor,
unsigned nr, unsigned int nr,
erofs_vtptr_t *pages, unsigned i) erofs_vtptr_t *pages,
unsigned int i)
{ {
ctor->nr = nr; ctor->nr = nr;
ctor->curr = ctor->next = NULL; ctor->curr = ctor->next = NULL;
......
...@@ -34,7 +34,7 @@ struct z_erofs_vle_work { ...@@ -34,7 +34,7 @@ struct z_erofs_vle_work {
unsigned short nr_pages; unsigned short nr_pages;
/* L: queued pages in pagevec[] */ /* L: queued pages in pagevec[] */
unsigned vcnt; unsigned int vcnt;
union { union {
/* L: pagevec */ /* L: pagevec */
...@@ -124,7 +124,7 @@ union z_erofs_onlinepage_converter { ...@@ -124,7 +124,7 @@ union z_erofs_onlinepage_converter {
unsigned long *v; unsigned long *v;
}; };
static inline unsigned z_erofs_onlinepage_index(struct page *page) static inline unsigned int z_erofs_onlinepage_index(struct page *page)
{ {
union z_erofs_onlinepage_converter u; union z_erofs_onlinepage_converter u;
...@@ -164,7 +164,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page, ...@@ -164,7 +164,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page,
} }
v = (index << Z_EROFS_ONLINEPAGE_INDEX_SHIFT) | v = (index << Z_EROFS_ONLINEPAGE_INDEX_SHIFT) |
((o & Z_EROFS_ONLINEPAGE_COUNT_MASK) + (unsigned)down); ((o & Z_EROFS_ONLINEPAGE_COUNT_MASK) + (unsigned int)down);
if (cmpxchg(p, o, v) != o) if (cmpxchg(p, o, v) != o)
goto repeat; goto repeat;
} }
...@@ -172,7 +172,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page, ...@@ -172,7 +172,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page,
static inline void z_erofs_onlinepage_endio(struct page *page) static inline void z_erofs_onlinepage_endio(struct page *page)
{ {
union z_erofs_onlinepage_converter u; union z_erofs_onlinepage_converter u;
unsigned v; unsigned int v;
DBG_BUGON(!PagePrivate(page)); DBG_BUGON(!PagePrivate(page));
u.v = &page_private(page); u.v = &page_private(page);
......
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
/* Attribute not found */ /* Attribute not found */
#define ENOATTR ENODATA #define ENOATTR ENODATA
static inline unsigned inlinexattr_header_size(struct inode *inode) static inline unsigned int inlinexattr_header_size(struct inode *inode)
{ {
return sizeof(struct erofs_xattr_ibody_header) return sizeof(struct erofs_xattr_ibody_header)
+ sizeof(u32) * EROFS_V(inode)->xattr_shared_count; + sizeof(u32) * EROFS_V(inode)->xattr_shared_count;
} }
static inline erofs_blk_t static inline erofs_blk_t xattrblock_addr(struct erofs_sb_info *sbi,
xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id) unsigned int xattr_id)
{ {
#ifdef CONFIG_EROFS_FS_XATTR #ifdef CONFIG_EROFS_FS_XATTR
return sbi->xattr_blkaddr + return sbi->xattr_blkaddr +
...@@ -37,8 +37,8 @@ xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id) ...@@ -37,8 +37,8 @@ xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
#endif #endif
} }
static inline unsigned static inline unsigned int xattrblock_offset(struct erofs_sb_info *sbi,
xattrblock_offset(struct erofs_sb_info *sbi, unsigned xattr_id) unsigned int xattr_id)
{ {
return (xattr_id * sizeof(__u32)) % EROFS_BLKSIZ; return (xattr_id * sizeof(__u32)) % EROFS_BLKSIZ;
} }
...@@ -49,7 +49,7 @@ extern const struct xattr_handler erofs_xattr_trusted_handler; ...@@ -49,7 +49,7 @@ extern const struct xattr_handler erofs_xattr_trusted_handler;
extern const struct xattr_handler erofs_xattr_security_handler; extern const struct xattr_handler erofs_xattr_security_handler;
#endif #endif
static inline const struct xattr_handler *erofs_xattr_handler(unsigned index) static inline const struct xattr_handler *erofs_xattr_handler(unsigned int idx)
{ {
static const struct xattr_handler *xattr_handler_map[] = { static const struct xattr_handler *xattr_handler_map[] = {
[EROFS_XATTR_INDEX_USER] = &erofs_xattr_user_handler, [EROFS_XATTR_INDEX_USER] = &erofs_xattr_user_handler,
...@@ -63,8 +63,9 @@ static const struct xattr_handler *xattr_handler_map[] = { ...@@ -63,8 +63,9 @@ static const struct xattr_handler *xattr_handler_map[] = {
[EROFS_XATTR_INDEX_SECURITY] = &erofs_xattr_security_handler, [EROFS_XATTR_INDEX_SECURITY] = &erofs_xattr_security_handler,
#endif #endif
}; };
return index && index < ARRAY_SIZE(xattr_handler_map) ?
xattr_handler_map[index] : NULL; return idx && idx < ARRAY_SIZE(xattr_handler_map) ?
xattr_handler_map[idx] : NULL;
} }
#ifdef CONFIG_EROFS_FS_XATTR #ifdef CONFIG_EROFS_FS_XATTR
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment