* [PATCH] staging: erofs:converting all 'unsigned' to 'unsigned int'
@ 2019-07-15 5:50 Pratik Shinde
2019-07-15 6:33 ` Gao Xiang
0 siblings, 1 reply; 7+ messages in thread
From: Pratik Shinde @ 2019-07-15 5:50 UTC (permalink / raw)
Fixed check patch warnings: converting all 'unsigned' to 'unsigned int'
Signed-off-by: Pratik Shinde <pratikshinde320 at gmail.com>
---
drivers/staging/erofs/internal.h | 7 ++++---
drivers/staging/erofs/unzip_pagevec.h | 11 ++++++-----
drivers/staging/erofs/unzip_vle.h | 8 ++++----
drivers/staging/erofs/xattr.h | 11 ++++++-----
4 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h
index 963cc1b..0ebc294 100644
--- a/drivers/staging/erofs/internal.h
+++ b/drivers/staging/erofs/internal.h
@@ -359,8 +359,8 @@ struct erofs_vnode {
unsigned char inode_isize;
unsigned short xattr_isize;
- unsigned xattr_shared_count;
- unsigned *xattr_shared_xattrs;
+ unsigned int xattr_shared_count;
+ unsigned int *xattr_shared_xattrs;
union {
erofs_blk_t raw_blkaddr;
@@ -510,7 +510,8 @@ erofs_grab_bio(struct super_block *sb,
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);
submit_bio(bio);
diff --git a/drivers/staging/erofs/unzip_pagevec.h b/drivers/staging/erofs/unzip_pagevec.h
index 7af0ba8..e65dbca 100644
--- a/drivers/staging/erofs/unzip_pagevec.h
+++ b/drivers/staging/erofs/unzip_pagevec.h
@@ -54,9 +54,9 @@ static inline void z_erofs_pagevec_ctor_exit(struct z_erofs_pagevec_ctor *ctor,
static inline struct page *
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 */
if (ctor->next)
@@ -64,7 +64,7 @@ z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor,
for (index = 0; index < nr; ++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)
return tagptr_unfold_ptr(t);
@@ -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,
- unsigned nr,
- erofs_vtptr_t *pages, unsigned i)
+ unsigned int nr,
+ erofs_vtptr_t *pages,
+ unsigned int i)
{
ctor->nr = nr;
ctor->curr = ctor->next = NULL;
diff --git a/drivers/staging/erofs/unzip_vle.h b/drivers/staging/erofs/unzip_vle.h
index ab509d75..df91ad1 100644
--- a/drivers/staging/erofs/unzip_vle.h
+++ b/drivers/staging/erofs/unzip_vle.h
@@ -34,7 +34,7 @@ struct z_erofs_vle_work {
unsigned short nr_pages;
/* L: queued pages in pagevec[] */
- unsigned vcnt;
+ unsigned int vcnt;
union {
/* L: pagevec */
@@ -124,7 +124,7 @@ union z_erofs_onlinepage_converter {
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;
@@ -164,7 +164,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page,
}
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)
goto repeat;
}
@@ -172,7 +172,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page,
static inline void z_erofs_onlinepage_endio(struct page *page)
{
union z_erofs_onlinepage_converter u;
- unsigned v;
+ unsigned int v;
DBG_BUGON(!PagePrivate(page));
u.v = &page_private(page);
diff --git a/drivers/staging/erofs/xattr.h b/drivers/staging/erofs/xattr.h
index 35ba5ac..bbf13c4 100644
--- a/drivers/staging/erofs/xattr.h
+++ b/drivers/staging/erofs/xattr.h
@@ -20,14 +20,14 @@
/* Attribute not found */
#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)
+ sizeof(u32) * EROFS_V(inode)->xattr_shared_count;
}
static inline erofs_blk_t
-xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
+xattrblock_addr(struct erofs_sb_info *sbi, unsigned int xattr_id)
{
#ifdef CONFIG_EROFS_FS_XATTR
return sbi->xattr_blkaddr +
@@ -37,8 +37,8 @@ xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
#endif
}
-static inline unsigned
-xattrblock_offset(struct erofs_sb_info *sbi, unsigned xattr_id)
+static inline unsigned int
+xattrblock_offset(struct erofs_sb_info *sbi, unsigned int xattr_id)
{
return (xattr_id * sizeof(__u32)) % EROFS_BLKSIZ;
}
@@ -49,7 +49,8 @@ extern const struct xattr_handler erofs_xattr_trusted_handler;
extern const struct xattr_handler erofs_xattr_security_handler;
#endif
-static inline const struct xattr_handler *erofs_xattr_handler(unsigned index)
+static inline const struct xattr_handler *erofs_xattr_handler(
+ unsigned int index)
{
static const struct xattr_handler *xattr_handler_map[] = {
[EROFS_XATTR_INDEX_USER] = &erofs_xattr_user_handler,
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH] staging: erofs:converting all 'unsigned' to 'unsigned int'
2019-07-15 5:50 [PATCH] staging: erofs:converting all 'unsigned' to 'unsigned int' Pratik Shinde
@ 2019-07-15 6:33 ` Gao Xiang
0 siblings, 0 replies; 7+ messages in thread
From: Gao Xiang @ 2019-07-15 6:33 UTC (permalink / raw)
On 2019/7/15 13:50, Pratik Shinde wrote:
> Fixed check patch warnings: converting all 'unsigned' to 'unsigned int'
>
> Signed-off-by: Pratik Shinde <pratikshinde320 at gmail.com>
The subject line should be better as "[PATCH v2] staging: erofs:converting all 'unsigned' to 'unsigned int'"
> ---
> drivers/staging/erofs/internal.h | 7 ++++---
> drivers/staging/erofs/unzip_pagevec.h | 11 ++++++-----
> drivers/staging/erofs/unzip_vle.h | 8 ++++----
> drivers/staging/erofs/xattr.h | 11 ++++++-----
> 4 files changed, 20 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h
> index 963cc1b..0ebc294 100644
> --- a/drivers/staging/erofs/internal.h
> +++ b/drivers/staging/erofs/internal.h
> @@ -359,8 +359,8 @@ struct erofs_vnode {
> unsigned char inode_isize;
> unsigned short xattr_isize;
>
> - unsigned xattr_shared_count;
> - unsigned *xattr_shared_xattrs;
> + unsigned int xattr_shared_count;
> + unsigned int *xattr_shared_xattrs;
>
> union {
> erofs_blk_t raw_blkaddr;
> @@ -510,7 +510,8 @@ erofs_grab_bio(struct super_block *sb,
> 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);
> submit_bio(bio);
> diff --git a/drivers/staging/erofs/unzip_pagevec.h b/drivers/staging/erofs/unzip_pagevec.h
> index 7af0ba8..e65dbca 100644
> --- a/drivers/staging/erofs/unzip_pagevec.h
> +++ b/drivers/staging/erofs/unzip_pagevec.h
> @@ -54,9 +54,9 @@ static inline void z_erofs_pagevec_ctor_exit(struct z_erofs_pagevec_ctor *ctor,
>
> static inline struct page *
> 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 */
> if (ctor->next)
> @@ -64,7 +64,7 @@ z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor,
>
> for (index = 0; index < nr; ++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)
> return tagptr_unfold_ptr(t);
> @@ -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,
> - unsigned nr,
> - erofs_vtptr_t *pages, unsigned i)
> + unsigned int nr,
> + erofs_vtptr_t *pages,
> + unsigned int i)
> {
> ctor->nr = nr;
> ctor->curr = ctor->next = NULL;
> diff --git a/drivers/staging/erofs/unzip_vle.h b/drivers/staging/erofs/unzip_vle.h
> index ab509d75..df91ad1 100644
> --- a/drivers/staging/erofs/unzip_vle.h
> +++ b/drivers/staging/erofs/unzip_vle.h
> @@ -34,7 +34,7 @@ struct z_erofs_vle_work {
> unsigned short nr_pages;
>
> /* L: queued pages in pagevec[] */
> - unsigned vcnt;
> + unsigned int vcnt;
>
> union {
> /* L: pagevec */
> @@ -124,7 +124,7 @@ union z_erofs_onlinepage_converter {
> 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;
>
> @@ -164,7 +164,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page,
> }
>
> 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)
> goto repeat;
> }
> @@ -172,7 +172,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page,
> static inline void z_erofs_onlinepage_endio(struct page *page)
> {
> union z_erofs_onlinepage_converter u;
> - unsigned v;
> + unsigned int v;
>
> DBG_BUGON(!PagePrivate(page));
> u.v = &page_private(page);
> diff --git a/drivers/staging/erofs/xattr.h b/drivers/staging/erofs/xattr.h
> index 35ba5ac..bbf13c4 100644
> --- a/drivers/staging/erofs/xattr.h
> +++ b/drivers/staging/erofs/xattr.h
> @@ -20,14 +20,14 @@
> /* Attribute not found */
> #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)
> + sizeof(u32) * EROFS_V(inode)->xattr_shared_count;
> }
>
> static inline erofs_blk_t
> -xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
> +xattrblock_addr(struct erofs_sb_info *sbi, unsigned int xattr_id)
> {
> #ifdef CONFIG_EROFS_FS_XATTR
> return sbi->xattr_blkaddr +
> @@ -37,8 +37,8 @@ xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
> #endif
> }
>
> -static inline unsigned
> -xattrblock_offset(struct erofs_sb_info *sbi, unsigned xattr_id)
> +static inline unsigned int
> +xattrblock_offset(struct erofs_sb_info *sbi, unsigned int xattr_id)
How about..
36 static inline unsigned int xattrblock_offset(struct erofs_sb_info *sbi,
37 unsigned int xattr_id)
> {
> return (xattr_id * sizeof(__u32)) % EROFS_BLKSIZ;
> }
> @@ -49,7 +49,8 @@ extern const struct xattr_handler erofs_xattr_trusted_handler;
> extern const struct xattr_handler erofs_xattr_security_handler;
> #endif
>
> -static inline const struct xattr_handler *erofs_xattr_handler(unsigned index)
> +static inline const struct xattr_handler *erofs_xattr_handler(
> + unsigned int index)
How about
static inline const struct xattr_handler *erofs_xattr_handler(unsigned int idx)
since the above line is somewhat odd....
Thanks,
Gao Xiang
> {
> static const struct xattr_handler *xattr_handler_map[] = {
> [EROFS_XATTR_INDEX_USER] = &erofs_xattr_user_handler,
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] staging: erofs:converting all 'unsigned' to 'unsigned int'
@ 2019-07-15 11:29 Pratik Shinde
2019-07-15 12:09 ` Gao Xiang
0 siblings, 1 reply; 7+ messages in thread
From: Pratik Shinde @ 2019-07-15 11:29 UTC (permalink / raw)
Fixed checkpatch warnings: converting all 'unsigned' to 'unsigned int'
Signed-off-by: Pratik Shinde <pratikshinde320 at gmail.com>
---
drivers/staging/erofs/internal.h | 7 ++++---
drivers/staging/erofs/unzip_pagevec.h | 11 ++++++-----
drivers/staging/erofs/unzip_vle.h | 8 ++++----
drivers/staging/erofs/xattr.h | 17 +++++++++--------
4 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h
index 963cc1b..0ebc294 100644
--- a/drivers/staging/erofs/internal.h
+++ b/drivers/staging/erofs/internal.h
@@ -359,8 +359,8 @@ struct erofs_vnode {
unsigned char inode_isize;
unsigned short xattr_isize;
- unsigned xattr_shared_count;
- unsigned *xattr_shared_xattrs;
+ unsigned int xattr_shared_count;
+ unsigned int *xattr_shared_xattrs;
union {
erofs_blk_t raw_blkaddr;
@@ -510,7 +510,8 @@ erofs_grab_bio(struct super_block *sb,
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);
submit_bio(bio);
diff --git a/drivers/staging/erofs/unzip_pagevec.h b/drivers/staging/erofs/unzip_pagevec.h
index 7af0ba8..e65dbca 100644
--- a/drivers/staging/erofs/unzip_pagevec.h
+++ b/drivers/staging/erofs/unzip_pagevec.h
@@ -54,9 +54,9 @@ static inline void z_erofs_pagevec_ctor_exit(struct z_erofs_pagevec_ctor *ctor,
static inline struct page *
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 */
if (ctor->next)
@@ -64,7 +64,7 @@ z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor,
for (index = 0; index < nr; ++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)
return tagptr_unfold_ptr(t);
@@ -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,
- unsigned nr,
- erofs_vtptr_t *pages, unsigned i)
+ unsigned int nr,
+ erofs_vtptr_t *pages,
+ unsigned int i)
{
ctor->nr = nr;
ctor->curr = ctor->next = NULL;
diff --git a/drivers/staging/erofs/unzip_vle.h b/drivers/staging/erofs/unzip_vle.h
index ab509d75..df91ad1 100644
--- a/drivers/staging/erofs/unzip_vle.h
+++ b/drivers/staging/erofs/unzip_vle.h
@@ -34,7 +34,7 @@ struct z_erofs_vle_work {
unsigned short nr_pages;
/* L: queued pages in pagevec[] */
- unsigned vcnt;
+ unsigned int vcnt;
union {
/* L: pagevec */
@@ -124,7 +124,7 @@ union z_erofs_onlinepage_converter {
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;
@@ -164,7 +164,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page,
}
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)
goto repeat;
}
@@ -172,7 +172,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page,
static inline void z_erofs_onlinepage_endio(struct page *page)
{
union z_erofs_onlinepage_converter u;
- unsigned v;
+ unsigned int v;
DBG_BUGON(!PagePrivate(page));
u.v = &page_private(page);
diff --git a/drivers/staging/erofs/xattr.h b/drivers/staging/erofs/xattr.h
index 35ba5ac..3990805 100644
--- a/drivers/staging/erofs/xattr.h
+++ b/drivers/staging/erofs/xattr.h
@@ -20,14 +20,14 @@
/* Attribute not found */
#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)
+ sizeof(u32) * EROFS_V(inode)->xattr_shared_count;
}
-static inline erofs_blk_t
-xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
+static inline erofs_blk_t xattrblock_addr(struct erofs_sb_info *sbi,
+ unsigned int xattr_id)
{
#ifdef CONFIG_EROFS_FS_XATTR
return sbi->xattr_blkaddr +
@@ -37,8 +37,8 @@ xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
#endif
}
-static inline unsigned
-xattrblock_offset(struct erofs_sb_info *sbi, unsigned xattr_id)
+static inline unsigned int xattrblock_offset(struct erofs_sb_info *sbi,
+ unsigned int xattr_id)
{
return (xattr_id * sizeof(__u32)) % EROFS_BLKSIZ;
}
@@ -49,7 +49,7 @@ extern const struct xattr_handler erofs_xattr_trusted_handler;
extern const struct xattr_handler erofs_xattr_security_handler;
#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[] = {
[EROFS_XATTR_INDEX_USER] = &erofs_xattr_user_handler,
@@ -63,8 +63,9 @@ static const struct xattr_handler *xattr_handler_map[] = {
[EROFS_XATTR_INDEX_SECURITY] = &erofs_xattr_security_handler,
#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
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH] staging: erofs:converting all 'unsigned' to 'unsigned int'
2019-07-15 11:29 Pratik Shinde
@ 2019-07-15 12:09 ` Gao Xiang
0 siblings, 0 replies; 7+ messages in thread
From: Gao Xiang @ 2019-07-15 12:09 UTC (permalink / raw)
On 2019/7/15 19:29, Pratik Shinde wrote:
> Fixed checkpatch warnings: converting all 'unsigned' to 'unsigned int'
>
> Signed-off-by: Pratik Shinde <pratikshinde320 at gmail.com>
Bump version number and add my reviewed-by tag if you resend again...
since no idea which version is the latest version...
Thanks,
Gao Xiang
> ---
> drivers/staging/erofs/internal.h | 7 ++++---
> drivers/staging/erofs/unzip_pagevec.h | 11 ++++++-----
> drivers/staging/erofs/unzip_vle.h | 8 ++++----
> drivers/staging/erofs/xattr.h | 17 +++++++++--------
> 4 files changed, 23 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h
> index 963cc1b..0ebc294 100644
> --- a/drivers/staging/erofs/internal.h
> +++ b/drivers/staging/erofs/internal.h
> @@ -359,8 +359,8 @@ struct erofs_vnode {
> unsigned char inode_isize;
> unsigned short xattr_isize;
>
> - unsigned xattr_shared_count;
> - unsigned *xattr_shared_xattrs;
> + unsigned int xattr_shared_count;
> + unsigned int *xattr_shared_xattrs;
>
> union {
> erofs_blk_t raw_blkaddr;
> @@ -510,7 +510,8 @@ erofs_grab_bio(struct super_block *sb,
> 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);
> submit_bio(bio);
> diff --git a/drivers/staging/erofs/unzip_pagevec.h b/drivers/staging/erofs/unzip_pagevec.h
> index 7af0ba8..e65dbca 100644
> --- a/drivers/staging/erofs/unzip_pagevec.h
> +++ b/drivers/staging/erofs/unzip_pagevec.h
> @@ -54,9 +54,9 @@ static inline void z_erofs_pagevec_ctor_exit(struct z_erofs_pagevec_ctor *ctor,
>
> static inline struct page *
> 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 */
> if (ctor->next)
> @@ -64,7 +64,7 @@ z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor,
>
> for (index = 0; index < nr; ++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)
> return tagptr_unfold_ptr(t);
> @@ -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,
> - unsigned nr,
> - erofs_vtptr_t *pages, unsigned i)
> + unsigned int nr,
> + erofs_vtptr_t *pages,
> + unsigned int i)
> {
> ctor->nr = nr;
> ctor->curr = ctor->next = NULL;
> diff --git a/drivers/staging/erofs/unzip_vle.h b/drivers/staging/erofs/unzip_vle.h
> index ab509d75..df91ad1 100644
> --- a/drivers/staging/erofs/unzip_vle.h
> +++ b/drivers/staging/erofs/unzip_vle.h
> @@ -34,7 +34,7 @@ struct z_erofs_vle_work {
> unsigned short nr_pages;
>
> /* L: queued pages in pagevec[] */
> - unsigned vcnt;
> + unsigned int vcnt;
>
> union {
> /* L: pagevec */
> @@ -124,7 +124,7 @@ union z_erofs_onlinepage_converter {
> 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;
>
> @@ -164,7 +164,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page,
> }
>
> 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)
> goto repeat;
> }
> @@ -172,7 +172,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page,
> static inline void z_erofs_onlinepage_endio(struct page *page)
> {
> union z_erofs_onlinepage_converter u;
> - unsigned v;
> + unsigned int v;
>
> DBG_BUGON(!PagePrivate(page));
> u.v = &page_private(page);
> diff --git a/drivers/staging/erofs/xattr.h b/drivers/staging/erofs/xattr.h
> index 35ba5ac..3990805 100644
> --- a/drivers/staging/erofs/xattr.h
> +++ b/drivers/staging/erofs/xattr.h
> @@ -20,14 +20,14 @@
> /* Attribute not found */
> #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)
> + sizeof(u32) * EROFS_V(inode)->xattr_shared_count;
> }
>
> -static inline erofs_blk_t
> -xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
> +static inline erofs_blk_t xattrblock_addr(struct erofs_sb_info *sbi,
> + unsigned int xattr_id)
> {
> #ifdef CONFIG_EROFS_FS_XATTR
> return sbi->xattr_blkaddr +
> @@ -37,8 +37,8 @@ xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
> #endif
> }
>
> -static inline unsigned
> -xattrblock_offset(struct erofs_sb_info *sbi, unsigned xattr_id)
> +static inline unsigned int xattrblock_offset(struct erofs_sb_info *sbi,
> + unsigned int xattr_id)
> {
> return (xattr_id * sizeof(__u32)) % EROFS_BLKSIZ;
> }
> @@ -49,7 +49,7 @@ extern const struct xattr_handler erofs_xattr_trusted_handler;
> extern const struct xattr_handler erofs_xattr_security_handler;
> #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[] = {
> [EROFS_XATTR_INDEX_USER] = &erofs_xattr_user_handler,
> @@ -63,8 +63,9 @@ static const struct xattr_handler *xattr_handler_map[] = {
> [EROFS_XATTR_INDEX_SECURITY] = &erofs_xattr_security_handler,
> #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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] Staging: erofs:converting all 'unsigned' to 'unsigned int'
@ 2019-07-14 19:30 Pratik Shinde
2019-07-15 2:23 ` Gao Xiang
0 siblings, 1 reply; 7+ messages in thread
From: Pratik Shinde @ 2019-07-14 19:30 UTC (permalink / raw)
Fixing checkpath warnings : converting all 'unsigned' to 'unsigned int'
Signed-off-by: Pratik Shinde <pratikshinde320 at gmail.com>
---
drivers/staging/erofs/internal.h | 6 +++---
drivers/staging/erofs/unzip_pagevec.h | 10 +++++-----
drivers/staging/erofs/unzip_vle.h | 8 ++++----
drivers/staging/erofs/xattr.h | 10 +++++-----
4 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h
index 963cc1b..daae90b 100644
--- a/drivers/staging/erofs/internal.h
+++ b/drivers/staging/erofs/internal.h
@@ -359,8 +359,8 @@ struct erofs_vnode {
unsigned char inode_isize;
unsigned short xattr_isize;
- unsigned xattr_shared_count;
- unsigned *xattr_shared_xattrs;
+ unsigned int xattr_shared_count;
+ unsigned int *xattr_shared_xattrs;
union {
erofs_blk_t raw_blkaddr;
@@ -510,7 +510,7 @@ erofs_grab_bio(struct super_block *sb,
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);
submit_bio(bio);
diff --git a/drivers/staging/erofs/unzip_pagevec.h b/drivers/staging/erofs/unzip_pagevec.h
index 7af0ba8..198b556 100644
--- a/drivers/staging/erofs/unzip_pagevec.h
+++ b/drivers/staging/erofs/unzip_pagevec.h
@@ -54,9 +54,9 @@ static inline void z_erofs_pagevec_ctor_exit(struct z_erofs_pagevec_ctor *ctor,
static inline struct page *
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 */
if (ctor->next)
@@ -64,7 +64,7 @@ z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor,
for (index = 0; index < nr; ++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)
return tagptr_unfold_ptr(t);
@@ -91,8 +91,8 @@ 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,
- unsigned nr,
- erofs_vtptr_t *pages, unsigned i)
+ unsigned int nr,
+ erofs_vtptr_t *pages, unsigned int i)
{
ctor->nr = nr;
ctor->curr = ctor->next = NULL;
diff --git a/drivers/staging/erofs/unzip_vle.h b/drivers/staging/erofs/unzip_vle.h
index ab509d75..df91ad1 100644
--- a/drivers/staging/erofs/unzip_vle.h
+++ b/drivers/staging/erofs/unzip_vle.h
@@ -34,7 +34,7 @@ struct z_erofs_vle_work {
unsigned short nr_pages;
/* L: queued pages in pagevec[] */
- unsigned vcnt;
+ unsigned int vcnt;
union {
/* L: pagevec */
@@ -124,7 +124,7 @@ union z_erofs_onlinepage_converter {
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;
@@ -164,7 +164,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page,
}
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)
goto repeat;
}
@@ -172,7 +172,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page,
static inline void z_erofs_onlinepage_endio(struct page *page)
{
union z_erofs_onlinepage_converter u;
- unsigned v;
+ unsigned int v;
DBG_BUGON(!PagePrivate(page));
u.v = &page_private(page);
diff --git a/drivers/staging/erofs/xattr.h b/drivers/staging/erofs/xattr.h
index 35ba5ac..2fc9b43 100644
--- a/drivers/staging/erofs/xattr.h
+++ b/drivers/staging/erofs/xattr.h
@@ -20,14 +20,14 @@
/* Attribute not found */
#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)
+ sizeof(u32) * EROFS_V(inode)->xattr_shared_count;
}
static inline erofs_blk_t
-xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
+xattrblock_addr(struct erofs_sb_info *sbi, unsigned int xattr_id)
{
#ifdef CONFIG_EROFS_FS_XATTR
return sbi->xattr_blkaddr +
@@ -37,8 +37,8 @@ xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
#endif
}
-static inline unsigned
-xattrblock_offset(struct erofs_sb_info *sbi, unsigned xattr_id)
+static inline unsigned int
+xattrblock_offset(struct erofs_sb_info *sbi, unsigned int xattr_id)
{
return (xattr_id * sizeof(__u32)) % EROFS_BLKSIZ;
}
@@ -49,7 +49,7 @@ extern const struct xattr_handler erofs_xattr_trusted_handler;
extern const struct xattr_handler erofs_xattr_security_handler;
#endif
-static inline const struct xattr_handler *erofs_xattr_handler(unsigned index)
+static inline const struct xattr_handler *erofs_xattr_handler(unsigned int index)
{
static const struct xattr_handler *xattr_handler_map[] = {
[EROFS_XATTR_INDEX_USER] = &erofs_xattr_user_handler,
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH] Staging: erofs:converting all 'unsigned' to 'unsigned int'
2019-07-14 19:30 [PATCH] Staging: " Pratik Shinde
@ 2019-07-15 2:23 ` Gao Xiang
2019-07-15 5:11 ` Pratik Shinde
0 siblings, 1 reply; 7+ messages in thread
From: Gao Xiang @ 2019-07-15 2:23 UTC (permalink / raw)
Hi Pratik,
On 2019/7/15 3:30, Pratik Shinde wrote:
> Fixing checkpath warnings : converting all 'unsigned' to 'unsigned int'
>
> Signed-off-by: Pratik Shinde <pratikshinde320 at gmail.com>
> ---
> drivers/staging/erofs/internal.h | 6 +++---
> drivers/staging/erofs/unzip_pagevec.h | 10 +++++-----
> drivers/staging/erofs/unzip_vle.h | 8 ++++----
> drivers/staging/erofs/xattr.h | 10 +++++-----
> 4 files changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h
> index 963cc1b..daae90b 100644
> --- a/drivers/staging/erofs/internal.h
> +++ b/drivers/staging/erofs/internal.h
> @@ -359,8 +359,8 @@ struct erofs_vnode {
> unsigned char inode_isize;
> unsigned short xattr_isize;
>
> - unsigned xattr_shared_count;
> - unsigned *xattr_shared_xattrs;
> + unsigned int xattr_shared_count;
> + unsigned int *xattr_shared_xattrs;
>
> union {
> erofs_blk_t raw_blkaddr;
> @@ -510,7 +510,7 @@ erofs_grab_bio(struct super_block *sb,
> 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)
The subject line could be better as "staging: erofs: converting all 'unsigned' to 'unsigned int' "
and three new checkpatch warnings occurs after this patch...
WARNING: line over 80 characters
#86: FILE: drivers/staging/erofs/internal.h:513:
+static inline void __submit_bio(struct bio *bio, unsigned int op, unsigned int op_flags)
WARNING: line over 80 characters
#122: FILE: drivers/staging/erofs/unzip_pagevec.h:95:
+ erofs_vtptr_t *pages, unsigned int i)
WARNING: line over 80 characters
#203: FILE: drivers/staging/erofs/xattr.h:52:
+static inline const struct xattr_handler *erofs_xattr_handler(unsigned int index)
Thanks,
Gao Xiang
> {
> bio_set_op_attrs(bio, op, op_flags);
> submit_bio(bio);
> diff --git a/drivers/staging/erofs/unzip_pagevec.h b/drivers/staging/erofs/unzip_pagevec.h
> index 7af0ba8..198b556 100644
> --- a/drivers/staging/erofs/unzip_pagevec.h
> +++ b/drivers/staging/erofs/unzip_pagevec.h
> @@ -54,9 +54,9 @@ static inline void z_erofs_pagevec_ctor_exit(struct z_erofs_pagevec_ctor *ctor,
>
> static inline struct page *
> 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 */
> if (ctor->next)
> @@ -64,7 +64,7 @@ z_erofs_pagevec_ctor_next_page(struct z_erofs_pagevec_ctor *ctor,
>
> for (index = 0; index < nr; ++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)
> return tagptr_unfold_ptr(t);
> @@ -91,8 +91,8 @@ 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,
> - unsigned nr,
> - erofs_vtptr_t *pages, unsigned i)
> + unsigned int nr,
> + erofs_vtptr_t *pages, unsigned int i)
> {
> ctor->nr = nr;
> ctor->curr = ctor->next = NULL;
> diff --git a/drivers/staging/erofs/unzip_vle.h b/drivers/staging/erofs/unzip_vle.h
> index ab509d75..df91ad1 100644
> --- a/drivers/staging/erofs/unzip_vle.h
> +++ b/drivers/staging/erofs/unzip_vle.h
> @@ -34,7 +34,7 @@ struct z_erofs_vle_work {
> unsigned short nr_pages;
>
> /* L: queued pages in pagevec[] */
> - unsigned vcnt;
> + unsigned int vcnt;
>
> union {
> /* L: pagevec */
> @@ -124,7 +124,7 @@ union z_erofs_onlinepage_converter {
> 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;
>
> @@ -164,7 +164,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page,
> }
>
> 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)
> goto repeat;
> }
> @@ -172,7 +172,7 @@ static inline void z_erofs_onlinepage_fixup(struct page *page,
> static inline void z_erofs_onlinepage_endio(struct page *page)
> {
> union z_erofs_onlinepage_converter u;
> - unsigned v;
> + unsigned int v;
>
> DBG_BUGON(!PagePrivate(page));
> u.v = &page_private(page);
> diff --git a/drivers/staging/erofs/xattr.h b/drivers/staging/erofs/xattr.h
> index 35ba5ac..2fc9b43 100644
> --- a/drivers/staging/erofs/xattr.h
> +++ b/drivers/staging/erofs/xattr.h
> @@ -20,14 +20,14 @@
> /* Attribute not found */
> #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)
> + sizeof(u32) * EROFS_V(inode)->xattr_shared_count;
> }
>
> static inline erofs_blk_t
> -xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
> +xattrblock_addr(struct erofs_sb_info *sbi, unsigned int xattr_id)
> {
> #ifdef CONFIG_EROFS_FS_XATTR
> return sbi->xattr_blkaddr +
> @@ -37,8 +37,8 @@ xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
> #endif
> }
>
> -static inline unsigned
> -xattrblock_offset(struct erofs_sb_info *sbi, unsigned xattr_id)
> +static inline unsigned int
> +xattrblock_offset(struct erofs_sb_info *sbi, unsigned int xattr_id)
> {
> return (xattr_id * sizeof(__u32)) % EROFS_BLKSIZ;
> }
> @@ -49,7 +49,7 @@ extern const struct xattr_handler erofs_xattr_trusted_handler;
> extern const struct xattr_handler erofs_xattr_security_handler;
> #endif
>
> -static inline const struct xattr_handler *erofs_xattr_handler(unsigned index)
> +static inline const struct xattr_handler *erofs_xattr_handler(unsigned int index)
> {
> static const struct xattr_handler *xattr_handler_map[] = {
> [EROFS_XATTR_INDEX_USER] = &erofs_xattr_user_handler,
>
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH] Staging: erofs:converting all 'unsigned' to 'unsigned int'
2019-07-15 2:23 ` Gao Xiang
@ 2019-07-15 5:11 ` Pratik Shinde
0 siblings, 0 replies; 7+ messages in thread
From: Pratik Shinde @ 2019-07-15 5:11 UTC (permalink / raw)
Hi Gao,
I will rework the patch.
Will take care of the patch subject & '80 characters line limit'
Thanks,
Pratik.
On Mon, Jul 15, 2019@7:54 AM Gao Xiang <gaoxiang25@huawei.com> wrote:
> Hi Pratik,
>
> On 2019/7/15 3:30, Pratik Shinde wrote:
> > Fixing checkpath warnings : converting all 'unsigned' to 'unsigned int'
> >
> > Signed-off-by: Pratik Shinde <pratikshinde320 at gmail.com>
> > ---
> > drivers/staging/erofs/internal.h | 6 +++---
> > drivers/staging/erofs/unzip_pagevec.h | 10 +++++-----
> > drivers/staging/erofs/unzip_vle.h | 8 ++++----
> > drivers/staging/erofs/xattr.h | 10 +++++-----
> > 4 files changed, 17 insertions(+), 17 deletions(-)
> >
> > diff --git a/drivers/staging/erofs/internal.h
> b/drivers/staging/erofs/internal.h
> > index 963cc1b..daae90b 100644
> > --- a/drivers/staging/erofs/internal.h
> > +++ b/drivers/staging/erofs/internal.h
> > @@ -359,8 +359,8 @@ struct erofs_vnode {
> > unsigned char inode_isize;
> > unsigned short xattr_isize;
> >
> > - unsigned xattr_shared_count;
> > - unsigned *xattr_shared_xattrs;
> > + unsigned int xattr_shared_count;
> > + unsigned int *xattr_shared_xattrs;
> >
> > union {
> > erofs_blk_t raw_blkaddr;
> > @@ -510,7 +510,7 @@ erofs_grab_bio(struct super_block *sb,
> > 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)
>
> The subject line could be better as "staging: erofs: converting all
> 'unsigned' to 'unsigned int' "
> and three new checkpatch warnings occurs after this patch...
>
>
> WARNING: line over 80 characters
> #86: FILE: drivers/staging/erofs/internal.h:513:
> +static inline void __submit_bio(struct bio *bio, unsigned int op,
> unsigned int op_flags)
>
> WARNING: line over 80 characters
> #122: FILE: drivers/staging/erofs/unzip_pagevec.h:95:
> + erofs_vtptr_t *pages,
> unsigned int i)
>
> WARNING: line over 80 characters
> #203: FILE: drivers/staging/erofs/xattr.h:52:
> +static inline const struct xattr_handler *erofs_xattr_handler(unsigned
> int index)
>
> Thanks,
> Gao Xiang
>
> > {
> > bio_set_op_attrs(bio, op, op_flags);
> > submit_bio(bio);
> > diff --git a/drivers/staging/erofs/unzip_pagevec.h
> b/drivers/staging/erofs/unzip_pagevec.h
> > index 7af0ba8..198b556 100644
> > --- a/drivers/staging/erofs/unzip_pagevec.h
> > +++ b/drivers/staging/erofs/unzip_pagevec.h
> > @@ -54,9 +54,9 @@ static inline void z_erofs_pagevec_ctor_exit(struct
> z_erofs_pagevec_ctor *ctor,
> >
> > static inline struct page *
> > 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 */
> > if (ctor->next)
> > @@ -64,7 +64,7 @@ z_erofs_pagevec_ctor_next_page(struct
> z_erofs_pagevec_ctor *ctor,
> >
> > for (index = 0; index < nr; ++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)
> > return tagptr_unfold_ptr(t);
> > @@ -91,8 +91,8 @@ 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,
> > - unsigned nr,
> > - erofs_vtptr_t *pages,
> unsigned i)
> > + unsigned int nr,
> > + erofs_vtptr_t *pages,
> unsigned int i)
> > {
> > ctor->nr = nr;
> > ctor->curr = ctor->next = NULL;
> > diff --git a/drivers/staging/erofs/unzip_vle.h
> b/drivers/staging/erofs/unzip_vle.h
> > index ab509d75..df91ad1 100644
> > --- a/drivers/staging/erofs/unzip_vle.h
> > +++ b/drivers/staging/erofs/unzip_vle.h
> > @@ -34,7 +34,7 @@ struct z_erofs_vle_work {
> > unsigned short nr_pages;
> >
> > /* L: queued pages in pagevec[] */
> > - unsigned vcnt;
> > + unsigned int vcnt;
> >
> > union {
> > /* L: pagevec */
> > @@ -124,7 +124,7 @@ union z_erofs_onlinepage_converter {
> > 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;
> >
> > @@ -164,7 +164,7 @@ static inline void z_erofs_onlinepage_fixup(struct
> page *page,
> > }
> >
> > 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)
> > goto repeat;
> > }
> > @@ -172,7 +172,7 @@ static inline void z_erofs_onlinepage_fixup(struct
> page *page,
> > static inline void z_erofs_onlinepage_endio(struct page *page)
> > {
> > union z_erofs_onlinepage_converter u;
> > - unsigned v;
> > + unsigned int v;
> >
> > DBG_BUGON(!PagePrivate(page));
> > u.v = &page_private(page);
> > diff --git a/drivers/staging/erofs/xattr.h
> b/drivers/staging/erofs/xattr.h
> > index 35ba5ac..2fc9b43 100644
> > --- a/drivers/staging/erofs/xattr.h
> > +++ b/drivers/staging/erofs/xattr.h
> > @@ -20,14 +20,14 @@
> > /* Attribute not found */
> > #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)
> > + sizeof(u32) * EROFS_V(inode)->xattr_shared_count;
> > }
> >
> > static inline erofs_blk_t
> > -xattrblock_addr(struct erofs_sb_info *sbi, unsigned xattr_id)
> > +xattrblock_addr(struct erofs_sb_info *sbi, unsigned int xattr_id)
> > {
> > #ifdef CONFIG_EROFS_FS_XATTR
> > return sbi->xattr_blkaddr +
> > @@ -37,8 +37,8 @@ xattrblock_addr(struct erofs_sb_info *sbi, unsigned
> xattr_id)
> > #endif
> > }
> >
> > -static inline unsigned
> > -xattrblock_offset(struct erofs_sb_info *sbi, unsigned xattr_id)
> > +static inline unsigned int
> > +xattrblock_offset(struct erofs_sb_info *sbi, unsigned int xattr_id)
> > {
> > return (xattr_id * sizeof(__u32)) % EROFS_BLKSIZ;
> > }
> > @@ -49,7 +49,7 @@ extern const struct xattr_handler
> erofs_xattr_trusted_handler;
> > extern const struct xattr_handler erofs_xattr_security_handler;
> > #endif
> >
> > -static inline const struct xattr_handler *erofs_xattr_handler(unsigned
> index)
> > +static inline const struct xattr_handler *erofs_xattr_handler(unsigned
> int index)
> > {
> > static const struct xattr_handler *xattr_handler_map[] = {
> > [EROFS_XATTR_INDEX_USER] = &erofs_xattr_user_handler,
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linux-erofs/attachments/20190715/0a466c4b/attachment.htm>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-07-15 12:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-15 5:50 [PATCH] staging: erofs:converting all 'unsigned' to 'unsigned int' Pratik Shinde
2019-07-15 6:33 ` Gao Xiang
-- strict thread matches above, loose matches on Subject: below --
2019-07-15 11:29 Pratik Shinde
2019-07-15 12:09 ` Gao Xiang
2019-07-14 19:30 [PATCH] Staging: " Pratik Shinde
2019-07-15 2:23 ` Gao Xiang
2019-07-15 5:11 ` Pratik Shinde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox