staging: erofs: use explicit unsigned int type
PATCH 1/1 staging: erofs: use explicit unsigned int type
--- drivers/staging/erofs/data.c | 4 +-- drivers/staging/erofs/dir.c | 14 ++++---- drivers/staging/erofs/inode.c | 6 ++-- drivers/staging/erofs/namei.c | 28 ++++++++-------- drivers/staging/erofs/super.c | 2 +- drivers/staging/erofs/unzip_vle.c | 48 +++++++++++++-------------- drivers/staging/erofs/unzip_vle_lz4.c | 22 ++++++------ drivers/staging/erofs/utils.c | 2 +- drivers/staging/erofs/xattr.c | 40 +++++++++++----------- 9 files changed, 83 insertions(+), 83 deletions(-)
drivers/staging/erofs/data.c +2 -2
@@ -202,7 +202,7 @@ static inline struct bio *erofs_read_raw_page(struct address_space *mapping, struct page *page, erofs_off_t *last_block, - unsigned nblocks, + unsigned int nblocks, bool ra) { struct inode *inode = mapping->host;
@@ -236,7 +236,7 @@ static inline struct bio *erofs_read_raw_page( .m_la = blknr_to_addr(current_block), };erofs_blk_t blknr; -unsigned blkoff; +unsigned int blkoff; err =erofs_map_blocks (inode, &map,EROFS_GET_BLOCKS_RAW );if (unlikely (err))
drivers/staging/erofs/dir.c +7 -7
@@ -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,7 @@ 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)) {
drivers/staging/erofs/inode.c +3 -3
@@ -19,7 +19,7 @@ static int read_inode(struct inode *inode, void *data) {struct erofs_vnode *vi =EROFS_V (inode);struct erofs_inode_v1 *v1 = data; -const unsigned advise =le16_to_cpu (v1->i_advise); +const unsigned int advise =le16_to_cpu (v1->i_advise); vi->data_mapping_mode =__inode_data_mapping (advise);
@@ -112,7 +112,7 @@ static int read_inode(struct inode *inode, void *data)* try_lock since it takes no much overhead and * will success immediately. */ -static int fill_inline_data (struct inode *inode,void *data,unsigned m_pofs) +static int fill_inline_data (struct inode *inode,void *data,unsigned int m_pofs) {struct erofs_vnode *vi =EROFS_V (inode);struct erofs_sb_info *sbi =EROFS_I_SB (inode);
@@ -152,7 +152,7 @@ static int fill_inode(struct inode *inode, int isdir)void *data;int err;erofs_blk_t blkaddr; -unsigned ofs; +unsigned int ofs;trace_erofs_fill_inode (inode, isdir);
drivers/staging/erofs/namei.c +14 -14
@@ -17,9 +17,9 @@/* based on the value of qn->len is accurate */ static inline int dirnamecmp (struct qstr *qn, -struct qstr *qd,unsigned *matched) +struct qstr *qd,unsigned int *matched) { -unsigned i = *matched, len =min (qn->len, qd->len); +unsigned int i = *matched, len =min (qn->len, qd->len); loop:if (unlikely (i >= len)) { *matched = i;
@@ -46,8 +46,8 @@ static struct erofs_dirent *find_target_dirent(struct qstr *name, u8 *data, int maxsize) { - unsigned ndirents, head, back; -unsigned startprfx, endprfx; + unsigned int ndirents, head, back; +unsigned int startprfx, endprfx;struct erofs_dirent *const de = (struct erofs_dirent *)data;/* make sure that maxsize is valid */
@@ -63,9 +63,9 @@ static struct erofs_dirent *find_target_dirent( startprfx = endprfx =0 ;while (head <= back) { -unsigned mid = head + (back - head) /2 ; -unsigned nameoff =le16_to_cpu (de[mid].nameoff); -unsigned matched =min (startprfx, endprfx); +unsigned int mid = head + (back - head) /2 ; +unsigned int nameoff =le16_to_cpu (de[mid].nameoff); +unsigned int matched =min (startprfx, endprfx); struct qstr dname = QSTR_INIT(data + nameoff, unlikely(mid >= ndirents - 1) ?
@@ -95,8 +95,8 @@ static struct page *find_target_block_classic(struct inode *dir, struct qstr *name, int *_diff) { - unsigned startprfx, endprfx; -unsigned head, back; + unsigned int startprfx, endprfx; +unsigned int head, back;struct address_space *const mapping = dir->i_mapping;struct page *candidate =ERR_PTR (-ENOENT );
@@ -105,7 +105,7 @@ static struct page *find_target_block_classic( back =inode_datablocks (dir) -1 ;while (head <= back) { -unsigned mid = head + (back - head) /2 ; +unsigned int mid = head + (back - head) /2 ;struct page *page =read_mapping_page (mapping, mid,NULL );if (IS_ERR (page)) {
@@ -115,10 +115,10 @@ static struct page *find_target_block_classic(return page; }else {int diff; -unsigned ndirents, matched; +unsigned int ndirents, matched;struct qstr dname;struct erofs_dirent *de =kmap_atomic (page); -unsigned nameoff =le16_to_cpu (de->nameoff); +unsigned int nameoff =le16_to_cpu (de->nameoff); ndirents = nameoff /sizeof (*de);
@@ -164,7 +164,7 @@ static struct page *find_target_block_classic(int erofs_namei (struct inode *dir,struct qstr *name, -erofs_nid_t *nid,unsigned *d_type) +erofs_nid_t *nid,unsigned int *d_type) {int diff;struct page *page;
@@ -204,7 +204,7 @@ static struct dentry *erofs_lookup(struct inode *dir, {int err;erofs_nid_t nid; -unsigned d_type; +unsigned int d_type;struct inode *inode;DBG_BUGON (!d_really_is_negative (dentry));
drivers/staging/erofs/super.c +1 -1
@@ -81,7 +81,7 @@ static int superblock_read(struct super_block *sb)struct erofs_sb_info *sbi;struct buffer_head *bh;struct erofs_super_block *layout; -unsigned blkszbits; +unsigned int blkszbits;int ret; bh =sb_bread (sb,0 );
drivers/staging/erofs/unzip_vle.c +24 -24
175 lines not on this page · raw message
drivers/staging/erofs/unzip_vle_lz4.c +11 -11
@@ -23,14 +23,14 @@ static struct { } erofs_pcpubuf[NR_CPUS ];int z_erofs_vle_plain_copy (struct page **compressed_pages, -unsigned clusterpages, +unsigned int clusterpages,struct page **pages, -unsigned nr_pages, +unsigned int nr_pages,unsigned short pageofs) { -unsigned i, j; +unsigned int i, j;void *src =NULL ; -const unsigned righthalf =PAGE_SIZE - pageofs; +const unsigned int righthalf =PAGE_SIZE - pageofs;char *percpu_data;bool mirrored[Z_EROFS_CLUSTER_MAX_PAGES ] = {0 };
@@ -102,14 +102,14 @@ int z_erofs_vle_plain_copy(struct page **compressed_pages,extern int z_erofs_unzip_lz4 (void *in,void *out,size_t inlen,size_t outlen);int z_erofs_vle_unzip_fast_percpu (struct page **compressed_pages, -unsigned clusterpages, +unsigned int clusterpages,struct page **pages, -unsigned outlen, +unsigned int outlen,unsigned short pageofs,void (*endio)(struct page *)) {void *vin, *vout; -unsigned nr_pages, i, j; +unsigned int nr_pages, i, j;int ret;if (outlen + pageofs >EROFS_PERCPU_NR_PAGES *PAGE_SIZE )
@@ -134,7 +134,7 @@ int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages, }for (i =0 ; i < nr_pages; ++i) { - j =min ((unsigned )PAGE_SIZE - pageofs, outlen); + j =min ((unsigned int )PAGE_SIZE - pageofs, outlen);if (pages[i] !=NULL ) {if (ret <0 )
@@ -164,14 +164,14 @@ int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages, }int z_erofs_vle_unzip_vmap (struct page **compressed_pages, -unsigned clusterpages, +unsigned int clusterpages,void *vout, -unsigned llen, +unsigned int llen,unsigned short pageofs,bool overlapped) {void *vin; -unsigned i; +unsigned int i;int ret;if (overlapped) {
drivers/staging/erofs/utils.c +1 -1
@@ -120,7 +120,7 @@ unsigned long erofs_shrink_workstation(struct erofs_sb_info *sbi, {pgoff_t first_index =0 ;void *batch[PAGEVEC_SIZE ]; -unsigned freed =0 ; +unsigned int freed =0 ;int i, found; repeat:
drivers/staging/erofs/xattr.c +20 -20
@@ -19,7 +19,7 @@ struct xattr_iter {void *kaddr;erofs_blk_t blkaddr; -unsigned ofs; +unsigned int ofs; };static inline void xattr_iter_end (struct xattr_iter *it,bool atomic)
@@ -45,7 +45,7 @@ static inline void xattr_iter_end_final(struct xattr_iter *it)static int init_inode_xattrs (struct inode *inode) {struct xattr_iter it; -unsigned i; +unsigned int i;struct erofs_xattr_ibody_header *ih;struct super_block *sb;struct erofs_sb_info *sbi;
@@ -111,9 +111,9 @@ static int init_inode_xattrs(struct inode *inode)struct xattr_iter_handlers {int (*entry)(struct xattr_iter *,struct erofs_xattr_entry *); -int (*name)(struct xattr_iter *,unsigned ,char *,unsigned ); -int (*alloc_buffer)(struct xattr_iter *,unsigned ); -void (*value)(struct xattr_iter *,unsigned ,char *,unsigned ); +int (*name)(struct xattr_iter *,unsigned int ,char *,unsigned int ); +int (*alloc_buffer)(struct xattr_iter *,unsigned int ); +void (*value)(struct xattr_iter *,unsigned int ,char *,unsigned int ); };static inline int xattr_iter_fixup (struct xattr_iter *it)
@@ -143,7 +143,7 @@ static int inline_xattr_iter_begin(struct xattr_iter *it, {struct erofs_vnode *const vi =EROFS_V (inode);struct erofs_sb_info *const sbi =EROFS_SB (inode->i_sb); -unsigned xattr_header_sz, inline_xattr_ofs; +unsigned int xattr_header_sz, inline_xattr_ofs; xattr_header_sz =inlinexattr_header_size (inode);if (unlikely (xattr_header_sz >= vi->xattr_isize)) {
@@ -168,7 +168,7 @@ static int xattr_foreach(struct xattr_iter *it, const struct xattr_iter_handlers *op, unsigned int *tlimit) { struct erofs_xattr_entry entry; -unsigned value_sz, processed, slice; +unsigned int value_sz, processed, slice;int err;/* 0. fixup blkaddr, ofs, ipage */
@@ -183,7 +183,7 @@ static int xattr_foreach(struct xattr_iter *it,*/ entry = *(struct erofs_xattr_entry *)(it->kaddr + it->ofs);if (tlimit !=NULL ) { -unsigned entry_sz =EROFS_XATTR_ENTRY_SIZE (&entry); +unsigned int entry_sz =EROFS_XATTR_ENTRY_SIZE (&entry);BUG_ON (*tlimit < entry_sz); *tlimit -= entry_sz;
@@ -212,7 +212,7 @@ static int xattr_foreach(struct xattr_iter *it, it->ofs =0 ; } - slice =min_t (unsigned,PAGE_SIZE - it->ofs, + slice = min_t(unsigned int, PAGE_SIZE - it->ofs, entry.e_name_len - processed);/* handle name */
@@ -247,7 +247,7 @@ static int xattr_foreach(struct xattr_iter *it, it->ofs =0 ; } - slice =min_t (unsigned,PAGE_SIZE - it->ofs, + slice = min_t(unsigned int, PAGE_SIZE - it->ofs, value_sz - processed); op->value (it, processed, it->kaddr + it->ofs, slice); it->ofs += slice;
@@ -278,7 +278,7 @@ static int xattr_entrymatch(struct xattr_iter *_it, }static int xattr_namematch (struct xattr_iter *_it, -unsigned processed,char *buf,unsigned len) +unsigned int processed,char *buf,unsigned int len) { struct getxattr_iter *it = container_of(_it, struct getxattr_iter, it);
@@ -286,7 +286,7 @@ static int xattr_namematch(struct xattr_iter *_it, }static int xattr_checkbuffer (struct xattr_iter *_it, -unsigned value_sz) +unsigned int value_sz) { struct getxattr_iter *it = container_of(_it, struct getxattr_iter, it);int err = it->buffer_size < value_sz ? -ERANGE :0 ;
@@ -296,7 +296,7 @@ static int xattr_checkbuffer(struct xattr_iter *_it, }static void xattr_copyvalue (struct xattr_iter *_it, -unsigned processed,char *buf,unsigned len) +unsigned int processed,char *buf,unsigned int len) { struct getxattr_iter *it = container_of(_it, struct getxattr_iter, it);
@@ -313,7 +313,7 @@ static const struct xattr_iter_handlers find_xattr_handlers = {static int inline_getxattr (struct inode *inode,struct getxattr_iter *it) {int ret; -unsigned remaining; +unsigned int remaining; ret =inline_xattr_iter_begin (&it->it, inode);if (ret <0 )
@@ -338,7 +338,7 @@ static int shared_getxattr(struct inode *inode, struct getxattr_iter *it)struct erofs_vnode *const vi =EROFS_V (inode);struct super_block *const sb = inode->i_sb;struct erofs_sb_info *const sbi =EROFS_SB (sb); -unsigned i; +unsigned int i;int ret = -ENOATTR ;for (i =0 ; i < vi->xattr_shared_count; ++i) {
@@ -489,7 +489,7 @@ static int xattr_entrylist(struct xattr_iter *_it, {struct listxattr_iter *it = container_of(_it, struct listxattr_iter, it); -unsigned prefix_len; +unsigned int prefix_len;const char *prefix; const struct xattr_handler *h =
@@ -517,7 +517,7 @@ static int xattr_entrylist(struct xattr_iter *_it, }static int xattr_namelist (struct xattr_iter *_it, -unsigned processed,char *buf,unsigned len) +unsigned int processed,char *buf,unsigned int len) {struct listxattr_iter *it = container_of(_it, struct listxattr_iter, it);
@@ -528,7 +528,7 @@ static int xattr_namelist(struct xattr_iter *_it, }static int xattr_skipvalue (struct xattr_iter *_it, -unsigned value_sz) +unsigned int value_sz) {struct listxattr_iter *it = container_of(_it, struct listxattr_iter, it);
@@ -547,7 +547,7 @@ static const struct xattr_iter_handlers list_xattr_handlers = {static int inline_listxattr (struct listxattr_iter *it) {int ret; -unsigned remaining; +unsigned int remaining; ret =inline_xattr_iter_begin (&it->it,d_inode (it->dentry));if (ret <0 )
@@ -569,7 +569,7 @@ static int shared_listxattr(struct listxattr_iter *it)struct erofs_vnode *const vi =EROFS_V (inode);struct super_block *const sb = inode->i_sb;struct erofs_sb_info *const sbi =EROFS_SB (sb); -unsigned i; +unsigned int i;int ret =0 ;for (i =0 ; i < vi->xattr_shared_count; ++i) {
Signature · 1 line
2.18.0
PATCH 1/1 staging: erofs: use explicit unsigned int type
Hi,
It looks like there is another patch from Pavel Zemlyanoy changing the same place, I think it needs to rebase this patch on that one.
[PATCH 1/6] staging: erofs: formatting fix in unzip_vle_lz4.c
Quoted 673 lines · Thomas Wei?schuh
Signed-off-by Thomas Wei?schuh <linux at weissschuh.net>--- drivers/staging/erofs/data.c | 4 +-- drivers/staging/erofs/dir.c | 14 ++++---- drivers/staging/erofs/inode.c | 6 ++-- drivers/staging/erofs/namei.c | 28 ++++++++-------- drivers/staging/erofs/super.c | 2 +- drivers/staging/erofs/unzip_vle.c | 48 +++++++++++++-------------- drivers/staging/erofs/unzip_vle_lz4.c | 22 ++++++------ drivers/staging/erofs/utils.c | 2 +- drivers/staging/erofs/xattr.c | 40 +++++++++++----------- 9 files changed, 83 insertions(+), 83 deletions(-)drivers/staging/erofs/data.c +2
-2@@ -202,7 +202,7 @@ static inline struct bio *erofs_read_raw_page(struct address_space *mapping, struct page *page, erofs_off_t *last_block, - unsigned nblocks, + unsigned int nblocks, bool ra) { struct inode *inode = mapping->host;@@ -236,7 +236,7 @@ static inline struct bio *erofs_read_raw_page( .m_la = blknr_to_addr(current_block), };erofs_blk_t blknr; -unsigned blkoff; +unsigned int blkoff; err =erofs_map_blocks (inode, &map,EROFS_GET_BLOCKS_RAW );if (unlikely (err))drivers/staging/erofs/dir.c +7
-7@@ -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,7 @@ 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)) {drivers/staging/erofs/inode.c +3
-3@@ -19,7 +19,7 @@ static int read_inode(struct inode *inode, void *data) {struct erofs_vnode *vi =EROFS_V (inode);struct erofs_inode_v1 *v1 = data; -const unsigned advise =le16_to_cpu (v1->i_advise); +const unsigned int advise =le16_to_cpu (v1->i_advise); vi->data_mapping_mode =__inode_data_mapping (advise);@@ -112,7 +112,7 @@ static int read_inode(struct inode *inode, void *data)* try_lock since it takes no much overhead and * will success immediately. */ -static int fill_inline_data (struct inode *inode,void *data,unsigned m_pofs) +static int fill_inline_data (struct inode *inode,void *data,unsigned int m_pofs) {struct erofs_vnode *vi =EROFS_V (inode);struct erofs_sb_info *sbi =EROFS_I_SB (inode);@@ -152,7 +152,7 @@ static int fill_inode(struct inode *inode, int isdir)void *data;int err;erofs_blk_t blkaddr; -unsigned ofs; +unsigned int ofs;trace_erofs_fill_inode (inode, isdir);drivers/staging/erofs/namei.c +14
-14@@ -17,9 +17,9 @@/* based on the value of qn->len is accurate */ static inline int dirnamecmp (struct qstr *qn, -struct qstr *qd,unsigned *matched) +struct qstr *qd,unsigned int *matched) { -unsigned i = *matched, len =min (qn->len, qd->len); +unsigned int i = *matched, len =min (qn->len, qd->len); loop:if (unlikely (i >= len)) { *matched = i;@@ -46,8 +46,8 @@ static struct erofs_dirent *find_target_dirent(struct qstr *name, u8 *data, int maxsize) { - unsigned ndirents, head, back; -unsigned startprfx, endprfx; + unsigned int ndirents, head, back; +unsigned int startprfx, endprfx;struct erofs_dirent *const de = (struct erofs_dirent *)data;/* make sure that maxsize is valid */ @@ -63,9 +63,9 @@ static struct erofs_dirent *find_target_dirent( startprfx = endprfx =0 ;while (head <= back) { -unsigned mid = head + (back - head) /2 ; -unsigned nameoff =le16_to_cpu (de[mid].nameoff); -unsigned matched =min (startprfx, endprfx); +unsigned int mid = head + (back - head) /2 ; +unsigned int nameoff =le16_to_cpu (de[mid].nameoff); +unsigned int matched =min (startprfx, endprfx); struct qstr dname = QSTR_INIT(data + nameoff, unlikely(mid >= ndirents - 1) ?@@ -95,8 +95,8 @@ static struct page *find_target_block_classic(struct inode *dir, struct qstr *name, int *_diff) { - unsigned startprfx, endprfx; -unsigned head, back; + unsigned int startprfx, endprfx; +unsigned int head, back;struct address_space *const mapping = dir->i_mapping;struct page *candidate =ERR_PTR (-ENOENT );@@ -105,7 +105,7 @@ static struct page *find_target_block_classic( back =inode_datablocks (dir) -1 ;while (head <= back) { -unsigned mid = head + (back - head) /2 ; +unsigned int mid = head + (back - head) /2 ;struct page *page =read_mapping_page (mapping, mid,NULL );if (IS_ERR (page)) {@@ -115,10 +115,10 @@ static struct page *find_target_block_classic(return page; }else {int diff; -unsigned ndirents, matched; +unsigned int ndirents, matched;struct qstr dname;struct erofs_dirent *de =kmap_atomic (page); -unsigned nameoff =le16_to_cpu (de->nameoff); +unsigned int nameoff =le16_to_cpu (de->nameoff); ndirents = nameoff /sizeof (*de);@@ -164,7 +164,7 @@ static struct page *find_target_block_classic(int erofs_namei (struct inode *dir,struct qstr *name, -erofs_nid_t *nid,unsigned *d_type) +erofs_nid_t *nid,unsigned int *d_type) {int diff;struct page *page;@@ -204,7 +204,7 @@ static struct dentry *erofs_lookup(struct inode *dir, {int err;erofs_nid_t nid; -unsigned d_type; +unsigned int d_type;struct inode *inode;DBG_BUGON (!d_really_is_negative (dentry));drivers/staging/erofs/super.c +1
-1@@ -81,7 +81,7 @@ static int superblock_read(struct super_block *sb)struct erofs_sb_info *sbi;struct buffer_head *bh;struct erofs_super_block *layout; -unsigned blkszbits; +unsigned int blkszbits;int ret; bh =sb_bread (sb,0 );drivers/staging/erofs/unzip_vle.c +24
-24@@ -27,7 +27,7 @@ void z_erofs_exit_zip_subsystem(void)static inline int init_unzip_workqueue (void ) { -const unsigned onlinecpus =num_possible_cpus (); +const unsigned int onlinecpus =num_possible_cpus ();/* * we don't need too many threads, limiting threads @@ -89,7 +89,7 @@ struct z_erofs_vle_work_builder {/* pages used for reading the compressed data */ struct page **compressed_pages; -unsigned compressed_deficit; +unsigned int compressed_deficit; };#define VLE_WORK_BUILDER_INIT () \@@ -232,7 +232,7 @@ static int z_erofs_vle_work_add_page( ret =z_erofs_pagevec_ctor_enqueue (&builder->vector, page, type, &occupied); - builder->work->vcnt += (unsigned )ret; + builder->work->vcnt += (unsigned int )ret;return ret ?0 : -EAGAIN ; }@@ -274,7 +274,7 @@ static inline bool try_to_claim_workgroup(struct z_erofs_vle_work_finder {struct super_block *sb;pgoff_t idx; -unsigned pageofs; +unsigned int pageofs;struct z_erofs_vle_workgroup **grp_ret;enum z_erofs_vle_work_role *role;@@ -440,7 +440,7 @@ static int z_erofs_vle_work_iter_begin(struct z_erofs_vle_work_builder *builder, struct erofs_map_blocks *map, z_erofs_vle_owned_workgrp_t *owned_head) { - const unsigned clusterpages = erofs_clusterpages(EROFS_SB(sb)); +const unsigned int clusterpages =erofs_clusterpages (EROFS_SB (sb));struct z_erofs_vle_workgroup *grp;const struct z_erofs_vle_work_finder finder = { .sb = sb,@@ -610,7 +610,7 @@ static int z_erofs_do_read_page(struct z_erofs_vle_frontend *fe,#endif enum z_erofs_page_type page_type; -unsigned cur, end, spiltted, index; +unsigned int cur, end, spiltted, index;int err;/* register locked file pages as online pages in pack */ @@ -667,7 +667,7 @@ static int z_erofs_do_read_page(struct z_erofs_vle_frontend *fe, tight &=builder_is_followed (builder); work = builder->work; hitted: - cur = end -min_t (unsigned, offset + end - map->m_la, end); + cur = end - min_t(unsigned int, offset + end - map->m_la, end);if (unlikely (!(map->m_flags &EROFS_MAP_MAPPED ))) {zero_user_segment (page, cur, end); goto next_part;@@ -741,7 +741,7 @@ static void z_erofs_vle_unzip_kickoff(void *ptr, int bios)static inline void z_erofs_vle_read_endio (struct bio *bio) {const blk_status_t err = bio->bi_status; -unsigned i; +unsigned int i;struct bio_vec *bvec;#ifdef EROFS_FS_HAS_MANAGED_CACHE struct address_space *mngda =NULL ;@@ -793,16 +793,16 @@ static int z_erofs_vle_unzip(struct super_block *sb,#ifdef EROFS_FS_HAS_MANAGED_CACHE struct address_space *const mngda = sbi->managed_cache->i_mapping;#endif -const unsigned clusterpages =erofs_clusterpages (sbi); +const unsigned int clusterpages =erofs_clusterpages (sbi);struct z_erofs_pagevec_ctor ctor; -unsigned nr_pages; +unsigned int nr_pages;#ifndef CONFIG_EROFS_FS_ZIP_MULTIREF -unsigned sparsemem_pages =0 ; +unsigned int sparsemem_pages =0 ;#endif struct page *pages_onstack[Z_EROFS_VLE_VMAP_ONSTACK_PAGES ];struct page **pages, **compressed_pages, *page; -unsigned i, llen; +unsigned int i, llen;enum z_erofs_page_type page_type;bool overlapped;@@ -849,7 +849,7 @@ static int z_erofs_vle_unzip(struct super_block *sb, Z_EROFS_VLE_INLINE_PAGEVECS, work->pagevec, 0);for (i =0 ; i < work->vcnt; ++i) { -unsigned pagenr; +unsigned int pagenr; page =z_erofs_pagevec_ctor_dequeue (&ctor, &page_type);@@ -880,7 +880,7 @@ static int z_erofs_vle_unzip(struct super_block *sb, compressed_pages = grp->compressed_pages;for (i =0 ; i < clusterpages; ++i) { -unsigned pagenr; +unsigned int pagenr; page = compressed_pages[i];@@ -1105,7 +1105,7 @@ static bool z_erofs_vle_submit_all(struct super_block *sb, bool force_fg) {struct erofs_sb_info *const sbi =EROFS_SB (sb); -const unsigned clusterpages =erofs_clusterpages (sbi); +const unsigned int clusterpages =erofs_clusterpages (sbi);const gfp_t gfp =GFP_NOFS ;#ifdef EROFS_FS_HAS_MANAGED_CACHE struct address_space *const mngda = sbi->managed_cache->i_mapping;@@ -1117,7 +1117,7 @@ static bool z_erofs_vle_submit_all(struct super_block *sb,/* since bio will be NULL, no need to initialize last_index */ pgoff_t uninitialized_var (last_index );bool force_submit = false; -unsigned nr_bios; +unsigned int nr_bios;if (unlikely (owned_head ==Z_EROFS_VLE_WORKGRP_TAIL ))return false;@@ -1149,7 +1149,7 @@ static bool z_erofs_vle_submit_all(struct super_block *sb,struct z_erofs_vle_workgroup *grp;struct page **compressed_pages, *oldpage, *page;pgoff_t first_index; -unsigned i =0 ; +unsigned int i =0 ;#ifdef EROFS_FS_HAS_MANAGED_CACHE unsigned int noio =0 ;bool cachemngd;@@ -1337,7 +1337,7 @@ static int z_erofs_vle_normalaccess_readpage(struct file *file,static inline int __z_erofs_vle_normalaccess_readpages (struct file *filp,struct address_space *mapping, -struct list_head *pages,unsigned nr_pages,bool sync) +struct list_head *pages,unsigned int nr_pages,bool sync) {struct inode *const inode = mapping->host;@@ -1398,7 +1398,7 @@ static inline int __z_erofs_vle_normalaccess_readpages(static int z_erofs_vle_normalaccess_readpages (struct file *filp,struct address_space *mapping, -struct list_head *pages,unsigned nr_pages) +struct list_head *pages,unsigned int nr_pages) { return __z_erofs_vle_normalaccess_readpages(filp, mapping, pages, nr_pages,@@ -1445,7 +1445,7 @@ vle_extent_blkaddr(struct inode *inode, pgoff_t index)struct erofs_sb_info *sbi =EROFS_I_SB (inode);struct erofs_vnode *vi =EROFS_V (inode); -unsigned ofs =Z_EROFS_VLE_EXTENT_ALIGN (vi->inode_isize + +unsigned int ofs =Z_EROFS_VLE_EXTENT_ALIGN (vi->inode_isize + vi->xattr_isize) +sizeof (struct erofs_extent_header ) + index *sizeof (struct z_erofs_vle_decompressed_index );@@ -1458,7 +1458,7 @@ vle_extent_blkoff(struct inode *inode, pgoff_t index)struct erofs_sb_info *sbi =EROFS_I_SB (inode);struct erofs_vnode *vi =EROFS_V (inode); -unsigned ofs =Z_EROFS_VLE_EXTENT_ALIGN (vi->inode_isize + +unsigned int ofs =Z_EROFS_VLE_EXTENT_ALIGN (vi->inode_isize + vi->xattr_isize) +sizeof (struct erofs_extent_header ) + index *sizeof (struct z_erofs_vle_decompressed_index );@@ -1476,9 +1476,9 @@ static erofs_off_t vle_get_logical_extent_head(struct inode *inode, struct page **page_iter, void **kaddr_iter, - unsigned lcn, /* logical cluster number */ + unsigned int lcn, /* logical cluster number */ erofs_blk_t *pcn, - unsigned *flags) + unsigned int *flags) { /* for extent meta */ struct page *page = *page_iter;@@ -1531,7 +1531,7 @@ int z_erofs_map_blocks_iter(struct inode *inode,unsigned long long ofs, end;struct z_erofs_vle_decompressed_index *di;erofs_blk_t e_blkaddr, pcn; -unsigned lcn, logical_cluster_ofs, cluster_type; +unsigned int lcn, logical_cluster_ofs, cluster_type;u32 ofs_rem;struct page *mpage = *mpage_ret;void *kaddr;drivers/staging/erofs/unzip_vle_lz4.c +11
-11@@ -23,14 +23,14 @@ static struct { } erofs_pcpubuf[NR_CPUS ];int z_erofs_vle_plain_copy (struct page **compressed_pages, -unsigned clusterpages, +unsigned int clusterpages,struct page **pages, -unsigned nr_pages, +unsigned int nr_pages,unsigned short pageofs) { -unsigned i, j; +unsigned int i, j;void *src =NULL ; -const unsigned righthalf =PAGE_SIZE - pageofs; +const unsigned int righthalf =PAGE_SIZE - pageofs;char *percpu_data;bool mirrored[Z_EROFS_CLUSTER_MAX_PAGES ] = {0 };@@ -102,14 +102,14 @@ int z_erofs_vle_plain_copy(struct page **compressed_pages,extern int z_erofs_unzip_lz4 (void *in,void *out,size_t inlen,size_t outlen);int z_erofs_vle_unzip_fast_percpu (struct page **compressed_pages, -unsigned clusterpages, +unsigned int clusterpages,struct page **pages, -unsigned outlen, +unsigned int outlen,unsigned short pageofs,void (*endio)(struct page *)) {void *vin, *vout; -unsigned nr_pages, i, j; +unsigned int nr_pages, i, j;int ret;if (outlen + pageofs >EROFS_PERCPU_NR_PAGES *PAGE_SIZE )@@ -134,7 +134,7 @@ int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages, }for (i =0 ; i < nr_pages; ++i) { - j =min ((unsigned )PAGE_SIZE - pageofs, outlen); + j =min ((unsigned int )PAGE_SIZE - pageofs, outlen);if (pages[i] !=NULL ) {if (ret <0 )@@ -164,14 +164,14 @@ int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages, }int z_erofs_vle_unzip_vmap (struct page **compressed_pages, -unsigned clusterpages, +unsigned int clusterpages,void *vout, -unsigned llen, +unsigned int llen,unsigned short pageofs,bool overlapped) {void *vin; -unsigned i; +unsigned int i;int ret;if (overlapped) {drivers/staging/erofs/utils.c +1
-1@@ -120,7 +120,7 @@ unsigned long erofs_shrink_workstation(struct erofs_sb_info *sbi, {pgoff_t first_index =0 ;void *batch[PAGEVEC_SIZE ]; -unsigned freed =0 ; +unsigned int freed =0 ;int i, found; repeat:drivers/staging/erofs/xattr.c +20
-20@@ -19,7 +19,7 @@ struct xattr_iter {void *kaddr;erofs_blk_t blkaddr; -unsigned ofs; +unsigned int ofs; };static inline void xattr_iter_end (struct xattr_iter *it,bool atomic)@@ -45,7 +45,7 @@ static inline void xattr_iter_end_final(struct xattr_iter *it)static int init_inode_xattrs (struct inode *inode) {struct xattr_iter it; -unsigned i; +unsigned int i;struct erofs_xattr_ibody_header *ih;struct super_block *sb;struct erofs_sb_info *sbi;@@ -111,9 +111,9 @@ static int init_inode_xattrs(struct inode *inode)struct xattr_iter_handlers {int (*entry)(struct xattr_iter *,struct erofs_xattr_entry *); -int (*name)(struct xattr_iter *,unsigned ,char *,unsigned ); -int (*alloc_buffer)(struct xattr_iter *,unsigned ); -void (*value)(struct xattr_iter *,unsigned ,char *,unsigned ); +int (*name)(struct xattr_iter *,unsigned int ,char *,unsigned int ); +int (*alloc_buffer)(struct xattr_iter *,unsigned int ); +void (*value)(struct xattr_iter *,unsigned int ,char *,unsigned int ); };static inline int xattr_iter_fixup (struct xattr_iter *it)@@ -143,7 +143,7 @@ static int inline_xattr_iter_begin(struct xattr_iter *it, {struct erofs_vnode *const vi =EROFS_V (inode);struct erofs_sb_info *const sbi =EROFS_SB (inode->i_sb); -unsigned xattr_header_sz, inline_xattr_ofs; +unsigned int xattr_header_sz, inline_xattr_ofs; xattr_header_sz =inlinexattr_header_size (inode);if (unlikely (xattr_header_sz >= vi->xattr_isize)) {@@ -168,7 +168,7 @@ static int xattr_foreach(struct xattr_iter *it, const struct xattr_iter_handlers *op, unsigned int *tlimit) { struct erofs_xattr_entry entry; -unsigned value_sz, processed, slice; +unsigned int value_sz, processed, slice;int err;/* 0. fixup blkaddr, ofs, ipage */ @@ -183,7 +183,7 @@ static int xattr_foreach(struct xattr_iter *it,*/ entry = *(struct erofs_xattr_entry *)(it->kaddr + it->ofs);if (tlimit !=NULL ) { -unsigned entry_sz =EROFS_XATTR_ENTRY_SIZE (&entry); +unsigned int entry_sz =EROFS_XATTR_ENTRY_SIZE (&entry);BUG_ON (*tlimit < entry_sz); *tlimit -= entry_sz;@@ -212,7 +212,7 @@ static int xattr_foreach(struct xattr_iter *it, it->ofs =0 ; } - slice =min_t (unsigned,PAGE_SIZE - it->ofs, + slice = min_t(unsigned int, PAGE_SIZE - it->ofs, entry.e_name_len - processed);/* handle name */ @@ -247,7 +247,7 @@ static int xattr_foreach(struct xattr_iter *it, it->ofs =0 ; } - slice =min_t (unsigned,PAGE_SIZE - it->ofs, + slice = min_t(unsigned int, PAGE_SIZE - it->ofs, value_sz - processed); op->value (it, processed, it->kaddr + it->ofs, slice); it->ofs += slice;@@ -278,7 +278,7 @@ static int xattr_entrymatch(struct xattr_iter *_it, }static int xattr_namematch (struct xattr_iter *_it, -unsigned processed,char *buf,unsigned len) +unsigned int processed,char *buf,unsigned int len) { struct getxattr_iter *it = container_of(_it, struct getxattr_iter, it);@@ -286,7 +286,7 @@ static int xattr_namematch(struct xattr_iter *_it, }static int xattr_checkbuffer (struct xattr_iter *_it, -unsigned value_sz) +unsigned int value_sz) { struct getxattr_iter *it = container_of(_it, struct getxattr_iter, it);int err = it->buffer_size < value_sz ? -ERANGE :0 ;@@ -296,7 +296,7 @@ static int xattr_checkbuffer(struct xattr_iter *_it, }static void xattr_copyvalue (struct xattr_iter *_it, -unsigned processed,char *buf,unsigned len) +unsigned int processed,char *buf,unsigned int len) { struct getxattr_iter *it = container_of(_it, struct getxattr_iter, it);@@ -313,7 +313,7 @@ static const struct xattr_iter_handlers find_xattr_handlers = {static int inline_getxattr (struct inode *inode,struct getxattr_iter *it) {int ret; -unsigned remaining; +unsigned int remaining; ret =inline_xattr_iter_begin (&it->it, inode);if (ret <0 )@@ -338,7 +338,7 @@ static int shared_getxattr(struct inode *inode, struct getxattr_iter *it)struct erofs_vnode *const vi =EROFS_V (inode);struct super_block *const sb = inode->i_sb;struct erofs_sb_info *const sbi =EROFS_SB (sb); -unsigned i; +unsigned int i;int ret = -ENOATTR ;for (i =0 ; i < vi->xattr_shared_count; ++i) {@@ -489,7 +489,7 @@ static int xattr_entrylist(struct xattr_iter *_it, {struct listxattr_iter *it = container_of(_it, struct listxattr_iter, it); -unsigned prefix_len; +unsigned int prefix_len;const char *prefix; const struct xattr_handler *h =@@ -517,7 +517,7 @@ static int xattr_entrylist(struct xattr_iter *_it, }static int xattr_namelist (struct xattr_iter *_it, -unsigned processed,char *buf,unsigned len) +unsigned int processed,char *buf,unsigned int len) {struct listxattr_iter *it = container_of(_it, struct listxattr_iter, it);@@ -528,7 +528,7 @@ static int xattr_namelist(struct xattr_iter *_it, }static int xattr_skipvalue (struct xattr_iter *_it, -unsigned value_sz) +unsigned int value_sz) {struct listxattr_iter *it = container_of(_it, struct listxattr_iter, it);@@ -547,7 +547,7 @@ static const struct xattr_iter_handlers list_xattr_handlers = {static int inline_listxattr (struct listxattr_iter *it) {int ret; -unsigned remaining; +unsigned int remaining; ret =inline_xattr_iter_begin (&it->it,d_inode (it->dentry));if (ret <0 )@@ -569,7 +569,7 @@ static int shared_listxattr(struct listxattr_iter *it)struct erofs_vnode *const vi =EROFS_V (inode);struct super_block *const sb = inode->i_sb;struct erofs_sb_info *const sbi =EROFS_SB (sb); -unsigned i; +unsigned int i;int ret =0 ;for (i =0 ; i < vi->xattr_shared_count; ++i) {
PATCH 1/1 staging: erofs: use explicit unsigned int type
Hi Thomas,
Quoted 7 lines · Chao Yu
Hi,
It looks like there is another patch from Pavel Zemlyanoy changing the same place, I think it needs to rebase this patch on that one.
[PATCH 1/6] staging: erofs: formatting fix in
unzip_vle_lz4.c
Thanks for your patch.
Do you have some interest to fix this patch as Chao's suggestion?
Or I could fix this patch based on your work, if you have no time to do...Thanks in advance.
Thanks,
Gao Xiang
Quoted 675 lines · Thomas Wei?schuh
Quoted 673 lines
Signed-off-by Thomas Wei?schuh <linux at weissschuh.net>--- drivers/staging/erofs/data.c | 4 +-- drivers/staging/erofs/dir.c | 14 ++++---- drivers/staging/erofs/inode.c | 6 ++-- drivers/staging/erofs/namei.c | 28 ++++++++-------- drivers/staging/erofs/super.c | 2 +- drivers/staging/erofs/unzip_vle.c | 48 +++++++++++++-------------- drivers/staging/erofs/unzip_vle_lz4.c | 22 ++++++------ drivers/staging/erofs/utils.c | 2 +- drivers/staging/erofs/xattr.c | 40 +++++++++++----------- 9 files changed, 83 insertions(+), 83 deletions(-)drivers/staging/erofs/data.c +2
-2@@ -202,7 +202,7 @@ static inline struct bio *erofs_read_raw_page(struct address_space *mapping, struct page *page, erofs_off_t *last_block, - unsigned nblocks, + unsigned int nblocks, bool ra) { struct inode *inode = mapping->host;@@ -236,7 +236,7 @@ static inline struct bio *erofs_read_raw_page( .m_la = blknr_to_addr(current_block), };erofs_blk_t blknr; -unsigned blkoff; +unsigned int blkoff; err =erofs_map_blocks (inode, &map,EROFS_GET_BLOCKS_RAW );if (unlikely (err))drivers/staging/erofs/dir.c +7
-7@@ -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,7 @@ 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)) {drivers/staging/erofs/inode.c +3
-3@@ -19,7 +19,7 @@ static int read_inode(struct inode *inode, void *data) {struct erofs_vnode *vi =EROFS_V (inode);struct erofs_inode_v1 *v1 = data; -const unsigned advise =le16_to_cpu (v1->i_advise); +const unsigned int advise =le16_to_cpu (v1->i_advise); vi->data_mapping_mode =__inode_data_mapping (advise);@@ -112,7 +112,7 @@ static int read_inode(struct inode *inode, void *data)* try_lock since it takes no much overhead and * will success immediately. */ -static int fill_inline_data (struct inode *inode,void *data,unsigned m_pofs) +static int fill_inline_data (struct inode *inode,void *data,unsigned int m_pofs) {struct erofs_vnode *vi =EROFS_V (inode);struct erofs_sb_info *sbi =EROFS_I_SB (inode);@@ -152,7 +152,7 @@ static int fill_inode(struct inode *inode, int isdir)void *data;int err;erofs_blk_t blkaddr; -unsigned ofs; +unsigned int ofs;trace_erofs_fill_inode (inode, isdir);drivers/staging/erofs/namei.c +14
-14@@ -17,9 +17,9 @@/* based on the value of qn->len is accurate */ static inline int dirnamecmp (struct qstr *qn, -struct qstr *qd,unsigned *matched) +struct qstr *qd,unsigned int *matched) { -unsigned i = *matched, len =min (qn->len, qd->len); +unsigned int i = *matched, len =min (qn->len, qd->len); loop:if (unlikely (i >= len)) { *matched = i;@@ -46,8 +46,8 @@ static struct erofs_dirent *find_target_dirent(struct qstr *name, u8 *data, int maxsize) { - unsigned ndirents, head, back; -unsigned startprfx, endprfx; + unsigned int ndirents, head, back; +unsigned int startprfx, endprfx;struct erofs_dirent *const de = (struct erofs_dirent *)data;/* make sure that maxsize is valid */ @@ -63,9 +63,9 @@ static struct erofs_dirent *find_target_dirent( startprfx = endprfx =0 ;while (head <= back) { -unsigned mid = head + (back - head) /2 ; -unsigned nameoff =le16_to_cpu (de[mid].nameoff); -unsigned matched =min (startprfx, endprfx); +unsigned int mid = head + (back - head) /2 ; +unsigned int nameoff =le16_to_cpu (de[mid].nameoff); +unsigned int matched =min (startprfx, endprfx); struct qstr dname = QSTR_INIT(data + nameoff, unlikely(mid >= ndirents - 1) ?@@ -95,8 +95,8 @@ static struct page *find_target_block_classic(struct inode *dir, struct qstr *name, int *_diff) { - unsigned startprfx, endprfx; -unsigned head, back; + unsigned int startprfx, endprfx; +unsigned int head, back;struct address_space *const mapping = dir->i_mapping;struct page *candidate =ERR_PTR (-ENOENT );@@ -105,7 +105,7 @@ static struct page *find_target_block_classic( back =inode_datablocks (dir) -1 ;while (head <= back) { -unsigned mid = head + (back - head) /2 ; +unsigned int mid = head + (back - head) /2 ;struct page *page =read_mapping_page (mapping, mid,NULL );if (IS_ERR (page)) {@@ -115,10 +115,10 @@ static struct page *find_target_block_classic(return page; }else {int diff; -unsigned ndirents, matched; +unsigned int ndirents, matched;struct qstr dname;struct erofs_dirent *de =kmap_atomic (page); -unsigned nameoff =le16_to_cpu (de->nameoff); +unsigned int nameoff =le16_to_cpu (de->nameoff); ndirents = nameoff /sizeof (*de);@@ -164,7 +164,7 @@ static struct page *find_target_block_classic(int erofs_namei (struct inode *dir,struct qstr *name, -erofs_nid_t *nid,unsigned *d_type) +erofs_nid_t *nid,unsigned int *d_type) {int diff;struct page *page;@@ -204,7 +204,7 @@ static struct dentry *erofs_lookup(struct inode *dir, {int err;erofs_nid_t nid; -unsigned d_type; +unsigned int d_type;struct inode *inode;DBG_BUGON (!d_really_is_negative (dentry));drivers/staging/erofs/super.c +1
-1@@ -81,7 +81,7 @@ static int superblock_read(struct super_block *sb)struct erofs_sb_info *sbi;struct buffer_head *bh;struct erofs_super_block *layout; -unsigned blkszbits; +unsigned int blkszbits;int ret; bh =sb_bread (sb,0 );drivers/staging/erofs/unzip_vle.c +24
-24@@ -27,7 +27,7 @@ void z_erofs_exit_zip_subsystem(void)static inline int init_unzip_workqueue (void ) { -const unsigned onlinecpus =num_possible_cpus (); +const unsigned int onlinecpus =num_possible_cpus ();/* * we don't need too many threads, limiting threads @@ -89,7 +89,7 @@ struct z_erofs_vle_work_builder {/* pages used for reading the compressed data */ struct page **compressed_pages; -unsigned compressed_deficit; +unsigned int compressed_deficit; };#define VLE_WORK_BUILDER_INIT () \@@ -232,7 +232,7 @@ static int z_erofs_vle_work_add_page( ret =z_erofs_pagevec_ctor_enqueue (&builder->vector, page, type, &occupied); - builder->work->vcnt += (unsigned )ret; + builder->work->vcnt += (unsigned int )ret;return ret ?0 : -EAGAIN ; }@@ -274,7 +274,7 @@ static inline bool try_to_claim_workgroup(struct z_erofs_vle_work_finder {struct super_block *sb;pgoff_t idx; -unsigned pageofs; +unsigned int pageofs;struct z_erofs_vle_workgroup **grp_ret;enum z_erofs_vle_work_role *role;@@ -440,7 +440,7 @@ static int z_erofs_vle_work_iter_begin(struct z_erofs_vle_work_builder *builder, struct erofs_map_blocks *map, z_erofs_vle_owned_workgrp_t *owned_head) { - const unsigned clusterpages = erofs_clusterpages(EROFS_SB(sb)); +const unsigned int clusterpages =erofs_clusterpages (EROFS_SB (sb));struct z_erofs_vle_workgroup *grp;const struct z_erofs_vle_work_finder finder = { .sb = sb,@@ -610,7 +610,7 @@ static int z_erofs_do_read_page(struct z_erofs_vle_frontend *fe,#endif enum z_erofs_page_type page_type; -unsigned cur, end, spiltted, index; +unsigned int cur, end, spiltted, index;int err;/* register locked file pages as online pages in pack */ @@ -667,7 +667,7 @@ static int z_erofs_do_read_page(struct z_erofs_vle_frontend *fe, tight &=builder_is_followed (builder); work = builder->work; hitted: - cur = end -min_t (unsigned, offset + end - map->m_la, end); + cur = end - min_t(unsigned int, offset + end - map->m_la, end);if (unlikely (!(map->m_flags &EROFS_MAP_MAPPED ))) {zero_user_segment (page, cur, end); goto next_part;@@ -741,7 +741,7 @@ static void z_erofs_vle_unzip_kickoff(void *ptr, int bios)static inline void z_erofs_vle_read_endio (struct bio *bio) {const blk_status_t err = bio->bi_status; -unsigned i; +unsigned int i;struct bio_vec *bvec;#ifdef EROFS_FS_HAS_MANAGED_CACHE struct address_space *mngda =NULL ;@@ -793,16 +793,16 @@ static int z_erofs_vle_unzip(struct super_block *sb,#ifdef EROFS_FS_HAS_MANAGED_CACHE struct address_space *const mngda = sbi->managed_cache->i_mapping;#endif -const unsigned clusterpages =erofs_clusterpages (sbi); +const unsigned int clusterpages =erofs_clusterpages (sbi);struct z_erofs_pagevec_ctor ctor; -unsigned nr_pages; +unsigned int nr_pages;#ifndef CONFIG_EROFS_FS_ZIP_MULTIREF -unsigned sparsemem_pages =0 ; +unsigned int sparsemem_pages =0 ;#endif struct page *pages_onstack[Z_EROFS_VLE_VMAP_ONSTACK_PAGES ];struct page **pages, **compressed_pages, *page; -unsigned i, llen; +unsigned int i, llen;enum z_erofs_page_type page_type;bool overlapped;@@ -849,7 +849,7 @@ static int z_erofs_vle_unzip(struct super_block *sb, Z_EROFS_VLE_INLINE_PAGEVECS, work->pagevec, 0);for (i =0 ; i < work->vcnt; ++i) { -unsigned pagenr; +unsigned int pagenr; page =z_erofs_pagevec_ctor_dequeue (&ctor, &page_type);@@ -880,7 +880,7 @@ static int z_erofs_vle_unzip(struct super_block *sb, compressed_pages = grp->compressed_pages;for (i =0 ; i < clusterpages; ++i) { -unsigned pagenr; +unsigned int pagenr; page = compressed_pages[i];@@ -1105,7 +1105,7 @@ static bool z_erofs_vle_submit_all(struct super_block *sb, bool force_fg) {struct erofs_sb_info *const sbi =EROFS_SB (sb); -const unsigned clusterpages =erofs_clusterpages (sbi); +const unsigned int clusterpages =erofs_clusterpages (sbi);const gfp_t gfp =GFP_NOFS ;#ifdef EROFS_FS_HAS_MANAGED_CACHE struct address_space *const mngda = sbi->managed_cache->i_mapping;@@ -1117,7 +1117,7 @@ static bool z_erofs_vle_submit_all(struct super_block *sb,/* since bio will be NULL, no need to initialize last_index */ pgoff_t uninitialized_var (last_index );bool force_submit = false; -unsigned nr_bios; +unsigned int nr_bios;if (unlikely (owned_head ==Z_EROFS_VLE_WORKGRP_TAIL ))return false;@@ -1149,7 +1149,7 @@ static bool z_erofs_vle_submit_all(struct super_block *sb,struct z_erofs_vle_workgroup *grp;struct page **compressed_pages, *oldpage, *page;pgoff_t first_index; -unsigned i =0 ; +unsigned int i =0 ;#ifdef EROFS_FS_HAS_MANAGED_CACHE unsigned int noio =0 ;bool cachemngd;@@ -1337,7 +1337,7 @@ static int z_erofs_vle_normalaccess_readpage(struct file *file,static inline int __z_erofs_vle_normalaccess_readpages (struct file *filp,struct address_space *mapping, -struct list_head *pages,unsigned nr_pages,bool sync) +struct list_head *pages,unsigned int nr_pages,bool sync) {struct inode *const inode = mapping->host;@@ -1398,7 +1398,7 @@ static inline int __z_erofs_vle_normalaccess_readpages(static int z_erofs_vle_normalaccess_readpages (struct file *filp,struct address_space *mapping, -struct list_head *pages,unsigned nr_pages) +struct list_head *pages,unsigned int nr_pages) { return __z_erofs_vle_normalaccess_readpages(filp, mapping, pages, nr_pages,@@ -1445,7 +1445,7 @@ vle_extent_blkaddr(struct inode *inode, pgoff_t index)struct erofs_sb_info *sbi =EROFS_I_SB (inode);struct erofs_vnode *vi =EROFS_V (inode); -unsigned ofs =Z_EROFS_VLE_EXTENT_ALIGN (vi->inode_isize + +unsigned int ofs =Z_EROFS_VLE_EXTENT_ALIGN (vi->inode_isize + vi->xattr_isize) +sizeof (struct erofs_extent_header ) + index *sizeof (struct z_erofs_vle_decompressed_index );@@ -1458,7 +1458,7 @@ vle_extent_blkoff(struct inode *inode, pgoff_t index)struct erofs_sb_info *sbi =EROFS_I_SB (inode);struct erofs_vnode *vi =EROFS_V (inode); -unsigned ofs =Z_EROFS_VLE_EXTENT_ALIGN (vi->inode_isize + +unsigned int ofs =Z_EROFS_VLE_EXTENT_ALIGN (vi->inode_isize + vi->xattr_isize) +sizeof (struct erofs_extent_header ) + index *sizeof (struct z_erofs_vle_decompressed_index );@@ -1476,9 +1476,9 @@ static erofs_off_t vle_get_logical_extent_head(struct inode *inode, struct page **page_iter, void **kaddr_iter, - unsigned lcn, /* logical cluster number */ + unsigned int lcn, /* logical cluster number */ erofs_blk_t *pcn, - unsigned *flags) + unsigned int *flags) { /* for extent meta */ struct page *page = *page_iter;@@ -1531,7 +1531,7 @@ int z_erofs_map_blocks_iter(struct inode *inode,unsigned long long ofs, end;struct z_erofs_vle_decompressed_index *di;erofs_blk_t e_blkaddr, pcn; -unsigned lcn, logical_cluster_ofs, cluster_type; +unsigned int lcn, logical_cluster_ofs, cluster_type;u32 ofs_rem;struct page *mpage = *mpage_ret;void *kaddr;drivers/staging/erofs/unzip_vle_lz4.c +11
-11@@ -23,14 +23,14 @@ static struct { } erofs_pcpubuf[NR_CPUS ];int z_erofs_vle_plain_copy (struct page **compressed_pages, -unsigned clusterpages, +unsigned int clusterpages,struct page **pages, -unsigned nr_pages, +unsigned int nr_pages,unsigned short pageofs) { -unsigned i, j; +unsigned int i, j;void *src =NULL ; -const unsigned righthalf =PAGE_SIZE - pageofs; +const unsigned int righthalf =PAGE_SIZE - pageofs;char *percpu_data;bool mirrored[Z_EROFS_CLUSTER_MAX_PAGES ] = {0 };@@ -102,14 +102,14 @@ int z_erofs_vle_plain_copy(struct page **compressed_pages,extern int z_erofs_unzip_lz4 (void *in,void *out,size_t inlen,size_t outlen);int z_erofs_vle_unzip_fast_percpu (struct page **compressed_pages, -unsigned clusterpages, +unsigned int clusterpages,struct page **pages, -unsigned outlen, +unsigned int outlen,unsigned short pageofs,void (*endio)(struct page *)) {void *vin, *vout; -unsigned nr_pages, i, j; +unsigned int nr_pages, i, j;int ret;if (outlen + pageofs >EROFS_PERCPU_NR_PAGES *PAGE_SIZE )@@ -134,7 +134,7 @@ int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages, }for (i =0 ; i < nr_pages; ++i) { - j =min ((unsigned )PAGE_SIZE - pageofs, outlen); + j =min ((unsigned int )PAGE_SIZE - pageofs, outlen);if (pages[i] !=NULL ) {if (ret <0 )@@ -164,14 +164,14 @@ int z_erofs_vle_unzip_fast_percpu(struct page **compressed_pages, }int z_erofs_vle_unzip_vmap (struct page **compressed_pages, -unsigned clusterpages, +unsigned int clusterpages,void *vout, -unsigned llen, +unsigned int llen,unsigned short pageofs,bool overlapped) {void *vin; -unsigned i; +unsigned int i;int ret;if (overlapped) {drivers/staging/erofs/utils.c +1
-1@@ -120,7 +120,7 @@ unsigned long erofs_shrink_workstation(struct erofs_sb_info *sbi, {pgoff_t first_index =0 ;void *batch[PAGEVEC_SIZE ]; -unsigned freed =0 ; +unsigned int freed =0 ;int i, found; repeat:drivers/staging/erofs/xattr.c +20
-20@@ -19,7 +19,7 @@ struct xattr_iter {void *kaddr;erofs_blk_t blkaddr; -unsigned ofs; +unsigned int ofs; };static inline void xattr_iter_end (struct xattr_iter *it,bool atomic)@@ -45,7 +45,7 @@ static inline void xattr_iter_end_final(struct xattr_iter *it)static int init_inode_xattrs (struct inode *inode) {struct xattr_iter it; -unsigned i; +unsigned int i;struct erofs_xattr_ibody_header *ih;struct super_block *sb;struct erofs_sb_info *sbi;@@ -111,9 +111,9 @@ static int init_inode_xattrs(struct inode *inode)struct xattr_iter_handlers {int (*entry)(struct xattr_iter *,struct erofs_xattr_entry *); -int (*name)(struct xattr_iter *,unsigned ,char *,unsigned ); -int (*alloc_buffer)(struct xattr_iter *,unsigned ); -void (*value)(struct xattr_iter *,unsigned ,char *,unsigned ); +int (*name)(struct xattr_iter *,unsigned int ,char *,unsigned int ); +int (*alloc_buffer)(struct xattr_iter *,unsigned int ); +void (*value)(struct xattr_iter *,unsigned int ,char *,unsigned int ); };static inline int xattr_iter_fixup (struct xattr_iter *it)@@ -143,7 +143,7 @@ static int inline_xattr_iter_begin(struct xattr_iter *it, {struct erofs_vnode *const vi =EROFS_V (inode);struct erofs_sb_info *const sbi =EROFS_SB (inode->i_sb); -unsigned xattr_header_sz, inline_xattr_ofs; +unsigned int xattr_header_sz, inline_xattr_ofs; xattr_header_sz =inlinexattr_header_size (inode);if (unlikely (xattr_header_sz >= vi->xattr_isize)) {@@ -168,7 +168,7 @@ static int xattr_foreach(struct xattr_iter *it, const struct xattr_iter_handlers *op, unsigned int *tlimit) { struct erofs_xattr_entry entry; -unsigned value_sz, processed, slice; +unsigned int value_sz, processed, slice;int err;/* 0. fixup blkaddr, ofs, ipage */ @@ -183,7 +183,7 @@ static int xattr_foreach(struct xattr_iter *it,*/ entry = *(struct erofs_xattr_entry *)(it->kaddr + it->ofs);if (tlimit !=NULL ) { -unsigned entry_sz =EROFS_XATTR_ENTRY_SIZE (&entry); +unsigned int entry_sz =EROFS_XATTR_ENTRY_SIZE (&entry);BUG_ON (*tlimit < entry_sz); *tlimit -= entry_sz;@@ -212,7 +212,7 @@ static int xattr_foreach(struct xattr_iter *it, it->ofs =0 ; } - slice =min_t (unsigned,PAGE_SIZE - it->ofs, + slice = min_t(unsigned int, PAGE_SIZE - it->ofs, entry.e_name_len - processed);/* handle name */ @@ -247,7 +247,7 @@ static int xattr_foreach(struct xattr_iter *it, it->ofs =0 ; } - slice =min_t (unsigned,PAGE_SIZE - it->ofs, + slice = min_t(unsigned int, PAGE_SIZE - it->ofs, value_sz - processed); op->value (it, processed, it->kaddr + it->ofs, slice); it->ofs += slice;@@ -278,7 +278,7 @@ static int xattr_entrymatch(struct xattr_iter *_it, }static int xattr_namematch (struct xattr_iter *_it, -unsigned processed,char *buf,unsigned len) +unsigned int processed,char *buf,unsigned int len) { struct getxattr_iter *it = container_of(_it, struct getxattr_iter, it);@@ -286,7 +286,7 @@ static int xattr_namematch(struct xattr_iter *_it, }static int xattr_checkbuffer (struct xattr_iter *_it, -unsigned value_sz) +unsigned int value_sz) { struct getxattr_iter *it = container_of(_it, struct getxattr_iter, it);int err = it->buffer_size < value_sz ? -ERANGE :0 ;@@ -296,7 +296,7 @@ static int xattr_checkbuffer(struct xattr_iter *_it, }static void xattr_copyvalue (struct xattr_iter *_it, -unsigned processed,char *buf,unsigned len) +unsigned int processed,char *buf,unsigned int len) { struct getxattr_iter *it = container_of(_it, struct getxattr_iter, it);@@ -313,7 +313,7 @@ static const struct xattr_iter_handlers find_xattr_handlers = {static int inline_getxattr (struct inode *inode,struct getxattr_iter *it) {int ret; -unsigned remaining; +unsigned int remaining; ret =inline_xattr_iter_begin (&it->it, inode);if (ret <0 )@@ -338,7 +338,7 @@ static int shared_getxattr(struct inode *inode, struct getxattr_iter *it)struct erofs_vnode *const vi =EROFS_V (inode);struct super_block *const sb = inode->i_sb;struct erofs_sb_info *const sbi =EROFS_SB (sb); -unsigned i; +unsigned int i;int ret = -ENOATTR ;for (i =0 ; i < vi->xattr_shared_count; ++i) {@@ -489,7 +489,7 @@ static int xattr_entrylist(struct xattr_iter *_it, {struct listxattr_iter *it = container_of(_it, struct listxattr_iter, it); -unsigned prefix_len; +unsigned int prefix_len;const char *prefix; const struct xattr_handler *h =@@ -517,7 +517,7 @@ static int xattr_entrylist(struct xattr_iter *_it, }static int xattr_namelist (struct xattr_iter *_it, -unsigned processed,char *buf,unsigned len) +unsigned int processed,char *buf,unsigned int len) {struct listxattr_iter *it = container_of(_it, struct listxattr_iter, it);@@ -528,7 +528,7 @@ static int xattr_namelist(struct xattr_iter *_it, }static int xattr_skipvalue (struct xattr_iter *_it, -unsigned value_sz) +unsigned int value_sz) {struct listxattr_iter *it = container_of(_it, struct listxattr_iter, it);@@ -547,7 +547,7 @@ static const struct xattr_iter_handlers list_xattr_handlers = {static int inline_listxattr (struct listxattr_iter *it) {int ret; -unsigned remaining; +unsigned int remaining; ret =inline_xattr_iter_begin (&it->it,d_inode (it->dentry));if (ret <0 )@@ -569,7 +569,7 @@ static int shared_listxattr(struct listxattr_iter *it)struct erofs_vnode *const vi =EROFS_V (inode);struct super_block *const sb = inode->i_sb;struct erofs_sb_info *const sbi =EROFS_SB (sb); -unsigned i; +unsigned int i;int ret =0 ;for (i =0 ; i < vi->xattr_shared_count; ++i) {
PATCH 1/1 staging: erofs: use explicit unsigned int type
Quoted 8 lines · Gao Xiang
Hi Thomas,
Quoted 5 lines · Chao Yu
Hi,
It looks like there is another patch from Pavel Zemlyanoy changing the same place, I think it needs to rebase this patch on that one.
Quoted 7 lines
Quoted 2 lines
[PATCH 1/6] staging: erofs: formatting fix in
unzip_vle_lz4.cThanks for your patch.
Do you have some interest to fix this patch as Chao's suggestion?
Or I could fix this patch based on your work, if you have no time to do...Thanks in advance.
Gao, don't worry about it... It's not a bug fix. These kinds of patches are straight forward to review. You either apply it instantly or you respond and delete it from your brain.
We don't try to co-ordinate patches. We just apply whatever comes in the order that it arrives.
If it's a bugfix then it's another story. In that case we do ask people to redo it. Sometimes for security patches, I have fixed patches for people and given them authorship credit with the From: header in git. Other times maintainers write their own patch and give Reported-by credit instead.
For checkpatch.pl patches, if you decide to do the work yourself then there is no Reported-by tag required.
If you try to keep track of everyone sending patches then it's too much work... Forget about it.
regards,
dan carpenter
PATCH 1/1 staging: erofs: use explicit unsigned int type
Hi Dan,
Quoted 30 lines · Dan Carpenter
Quoted 8 lines · Gao Xiang
Hi Thomas,
Quoted 5 lines · Chao Yu
Hi,
It looks like there is another patch from Pavel Zemlyanoy changing the same place, I think it needs to rebase this patch on that one.
Quoted 7 lines
Quoted 2 lines
[PATCH 1/6] staging: erofs: formatting fix in
unzip_vle_lz4.cThanks for your patch.
Do you have some interest to fix this patch as Chao's suggestion?
Or I could fix this patch based on your work, if you have no time to do...Thanks in advance.Gao, don't worry about it... It's not a bug fix. These kinds of patches are straight forward to review. You either apply it instantly or you respond and delete it from your brain.
We don't try to co-ordinate patches. We just apply whatever comes in the order that it arrives.
If it's a bugfix then it's another story. In that case we do ask people to redo it. Sometimes for security patches, I have fixed patches for people and given them authorship credit with the From: header in git. Other times maintainers write their own patch and give Reported-by credit instead.
Quoted 6 lines
For checkpatch.pl patches, if you decide to do the work yourself then there is no Reported-by tag required.
If you try to keep track of everyone sending patches then it's too much work... Forget about it.
OK, Thanks for your kindly detailed explanation. ;)
I will fix these style issues by myself later if Thomas has no response.
But anyway, any patches helping to erofs are welcome. :)
Thanks,
Gao Xiang
Quoted 3 lines
regards,
dan carpenter
PATCH v2 1/1 staging: erofs: use explicit unsigned int type
In reply to Thomas WeißschuhChanges since v1:
* Removed changes that conflicted with
[PATCH 1/6] staging: erofs: formatting fix in unzip_vle_lz4.c
* Added patch description
-- >8 --
Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'" detected by checkpatch.pl
--- drivers/staging/erofs/data.c | 4 +-- drivers/staging/erofs/dir.c | 14 ++++----- drivers/staging/erofs/inode.c | 6 ++-- drivers/staging/erofs/namei.c | 28 +++++++++--------- drivers/staging/erofs/super.c | 2 +- drivers/staging/erofs/unzip_vle.c | 48 +++++++++++++++---------------- drivers/staging/erofs/utils.c | 2 +- drivers/staging/erofs/xattr.c | 40 +++++++++++++------------- 8 files changed, 72 insertions(+), 72 deletions(-)
drivers/staging/erofs/data.c +2 -2
@@ -202,7 +202,7 @@ static inline struct bio *erofs_read_raw_page(struct address_space *mapping, struct page *page, erofs_off_t *last_block, - unsigned nblocks, + unsigned int nblocks, bool ra) { struct inode *inode = mapping->host;
@@ -236,7 +236,7 @@ static inline struct bio *erofs_read_raw_page( .m_la = blknr_to_addr(current_block), };erofs_blk_t blknr; -unsigned blkoff; +unsigned int blkoff; err =erofs_map_blocks (inode, &map,EROFS_GET_BLOCKS_RAW );if (unlikely (err))
drivers/staging/erofs/dir.c +7 -7
@@ -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,7 @@ 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)) {
drivers/staging/erofs/inode.c +3 -3
@@ -19,7 +19,7 @@ static int read_inode(struct inode *inode, void *data) {struct erofs_vnode *vi =EROFS_V (inode);struct erofs_inode_v1 *v1 = data; -const unsigned advise =le16_to_cpu (v1->i_advise); +const unsigned int advise =le16_to_cpu (v1->i_advise); vi->data_mapping_mode =__inode_data_mapping (advise);
@@ -112,7 +112,7 @@ static int read_inode(struct inode *inode, void *data)* try_lock since it takes no much overhead and * will success immediately. */ -static int fill_inline_data (struct inode *inode,void *data,unsigned m_pofs) +static int fill_inline_data (struct inode *inode,void *data,unsigned int m_pofs) {struct erofs_vnode *vi =EROFS_V (inode);struct erofs_sb_info *sbi =EROFS_I_SB (inode);
@@ -152,7 +152,7 @@ static int fill_inode(struct inode *inode, int isdir)void *data;int err;erofs_blk_t blkaddr; -unsigned ofs; +unsigned int ofs;trace_erofs_fill_inode (inode, isdir);
drivers/staging/erofs/namei.c +14 -14
@@ -17,9 +17,9 @@/* based on the value of qn->len is accurate */ static inline int dirnamecmp (struct qstr *qn, -struct qstr *qd,unsigned *matched) +struct qstr *qd,unsigned int *matched) { -unsigned i = *matched, len =min (qn->len, qd->len); +unsigned int i = *matched, len =min (qn->len, qd->len); loop:if (unlikely (i >= len)) { *matched = i;
@@ -46,8 +46,8 @@ static struct erofs_dirent *find_target_dirent(struct qstr *name, u8 *data, int maxsize) { - unsigned ndirents, head, back; -unsigned startprfx, endprfx; + unsigned int ndirents, head, back; +unsigned int startprfx, endprfx;struct erofs_dirent *const de = (struct erofs_dirent *)data;/* make sure that maxsize is valid */
@@ -63,9 +63,9 @@ static struct erofs_dirent *find_target_dirent( startprfx = endprfx =0 ;while (head <= back) { -unsigned mid = head + (back - head) /2 ; -unsigned nameoff =le16_to_cpu (de[mid].nameoff); -unsigned matched =min (startprfx, endprfx); +unsigned int mid = head + (back - head) /2 ; +unsigned int nameoff =le16_to_cpu (de[mid].nameoff); +unsigned int matched =min (startprfx, endprfx); struct qstr dname = QSTR_INIT(data + nameoff, unlikely(mid >= ndirents - 1) ?
@@ -95,8 +95,8 @@ static struct page *find_target_block_classic(struct inode *dir, struct qstr *name, int *_diff) { - unsigned startprfx, endprfx; -unsigned head, back; + unsigned int startprfx, endprfx; +unsigned int head, back;struct address_space *const mapping = dir->i_mapping;struct page *candidate =ERR_PTR (-ENOENT );
@@ -105,7 +105,7 @@ static struct page *find_target_block_classic( back =inode_datablocks (dir) -1 ;while (head <= back) { -unsigned mid = head + (back - head) /2 ; +unsigned int mid = head + (back - head) /2 ;struct page *page =read_mapping_page (mapping, mid,NULL );if (IS_ERR (page)) {
@@ -115,10 +115,10 @@ static struct page *find_target_block_classic(return page; }else {int diff; -unsigned ndirents, matched; +unsigned int ndirents, matched;struct qstr dname;struct erofs_dirent *de =kmap_atomic (page); -unsigned nameoff =le16_to_cpu (de->nameoff); +unsigned int nameoff =le16_to_cpu (de->nameoff); ndirents = nameoff /sizeof (*de);
@@ -164,7 +164,7 @@ static struct page *find_target_block_classic(int erofs_namei (struct inode *dir,struct qstr *name, -erofs_nid_t *nid,unsigned *d_type) +erofs_nid_t *nid,unsigned int *d_type) {int diff;struct page *page;
@@ -204,7 +204,7 @@ static struct dentry *erofs_lookup(struct inode *dir, {int err;erofs_nid_t nid; -unsigned d_type; +unsigned int d_type;struct inode *inode;DBG_BUGON (!d_really_is_negative (dentry));
drivers/staging/erofs/super.c +1 -1
@@ -81,7 +81,7 @@ static int superblock_read(struct super_block *sb)struct erofs_sb_info *sbi;struct buffer_head *bh;struct erofs_super_block *layout; -unsigned blkszbits; +unsigned int blkszbits;int ret; bh =sb_bread (sb,0 );
drivers/staging/erofs/unzip_vle.c +24 -24
175 lines not on this page · raw message
drivers/staging/erofs/utils.c +1 -1
@@ -120,7 +120,7 @@ unsigned long erofs_shrink_workstation(struct erofs_sb_info *sbi, {pgoff_t first_index =0 ;void *batch[PAGEVEC_SIZE ]; -unsigned freed =0 ; +unsigned int freed =0 ;int i, found; repeat:
drivers/staging/erofs/xattr.c +20 -20
@@ -19,7 +19,7 @@ struct xattr_iter {void *kaddr;erofs_blk_t blkaddr; -unsigned ofs; +unsigned int ofs; };static inline void xattr_iter_end (struct xattr_iter *it,bool atomic)
@@ -45,7 +45,7 @@ static inline void xattr_iter_end_final(struct xattr_iter *it)static int init_inode_xattrs (struct inode *inode) {struct xattr_iter it; -unsigned i; +unsigned int i;struct erofs_xattr_ibody_header *ih;struct super_block *sb;struct erofs_sb_info *sbi;
@@ -111,9 +111,9 @@ static int init_inode_xattrs(struct inode *inode)struct xattr_iter_handlers {int (*entry)(struct xattr_iter *,struct erofs_xattr_entry *); -int (*name)(struct xattr_iter *,unsigned ,char *,unsigned ); -int (*alloc_buffer)(struct xattr_iter *,unsigned ); -void (*value)(struct xattr_iter *,unsigned ,char *,unsigned ); +int (*name)(struct xattr_iter *,unsigned int ,char *,unsigned int ); +int (*alloc_buffer)(struct xattr_iter *,unsigned int ); +void (*value)(struct xattr_iter *,unsigned int ,char *,unsigned int ); };static inline int xattr_iter_fixup (struct xattr_iter *it)
@@ -143,7 +143,7 @@ static int inline_xattr_iter_begin(struct xattr_iter *it, {struct erofs_vnode *const vi =EROFS_V (inode);struct erofs_sb_info *const sbi =EROFS_SB (inode->i_sb); -unsigned xattr_header_sz, inline_xattr_ofs; +unsigned int xattr_header_sz, inline_xattr_ofs; xattr_header_sz =inlinexattr_header_size (inode);if (unlikely (xattr_header_sz >= vi->xattr_isize)) {
@@ -168,7 +168,7 @@ static int xattr_foreach(struct xattr_iter *it, const struct xattr_iter_handlers *op, unsigned int *tlimit) { struct erofs_xattr_entry entry; -unsigned value_sz, processed, slice; +unsigned int value_sz, processed, slice;int err;/* 0. fixup blkaddr, ofs, ipage */
@@ -183,7 +183,7 @@ static int xattr_foreach(struct xattr_iter *it,*/ entry = *(struct erofs_xattr_entry *)(it->kaddr + it->ofs);if (tlimit !=NULL ) { -unsigned entry_sz =EROFS_XATTR_ENTRY_SIZE (&entry); +unsigned int entry_sz =EROFS_XATTR_ENTRY_SIZE (&entry);BUG_ON (*tlimit < entry_sz); *tlimit -= entry_sz;
@@ -212,7 +212,7 @@ static int xattr_foreach(struct xattr_iter *it, it->ofs =0 ; } - slice =min_t (unsigned,PAGE_SIZE - it->ofs, + slice = min_t(unsigned int, PAGE_SIZE - it->ofs, entry.e_name_len - processed);/* handle name */
@@ -247,7 +247,7 @@ static int xattr_foreach(struct xattr_iter *it, it->ofs =0 ; } - slice =min_t (unsigned,PAGE_SIZE - it->ofs, + slice = min_t(unsigned int, PAGE_SIZE - it->ofs, value_sz - processed); op->value (it, processed, it->kaddr + it->ofs, slice); it->ofs += slice;
@@ -278,7 +278,7 @@ static int xattr_entrymatch(struct xattr_iter *_it, }static int xattr_namematch (struct xattr_iter *_it, -unsigned processed,char *buf,unsigned len) +unsigned int processed,char *buf,unsigned int len) { struct getxattr_iter *it = container_of(_it, struct getxattr_iter, it);
@@ -286,7 +286,7 @@ static int xattr_namematch(struct xattr_iter *_it, }static int xattr_checkbuffer (struct xattr_iter *_it, -unsigned value_sz) +unsigned int value_sz) { struct getxattr_iter *it = container_of(_it, struct getxattr_iter, it);int err = it->buffer_size < value_sz ? -ERANGE :0 ;
@@ -296,7 +296,7 @@ static int xattr_checkbuffer(struct xattr_iter *_it, }static void xattr_copyvalue (struct xattr_iter *_it, -unsigned processed,char *buf,unsigned len) +unsigned int processed,char *buf,unsigned int len) { struct getxattr_iter *it = container_of(_it, struct getxattr_iter, it);
@@ -313,7 +313,7 @@ static const struct xattr_iter_handlers find_xattr_handlers = {static int inline_getxattr (struct inode *inode,struct getxattr_iter *it) {int ret; -unsigned remaining; +unsigned int remaining; ret =inline_xattr_iter_begin (&it->it, inode);if (ret <0 )
@@ -338,7 +338,7 @@ static int shared_getxattr(struct inode *inode, struct getxattr_iter *it)struct erofs_vnode *const vi =EROFS_V (inode);struct super_block *const sb = inode->i_sb;struct erofs_sb_info *const sbi =EROFS_SB (sb); -unsigned i; +unsigned int i;int ret = -ENOATTR ;for (i =0 ; i < vi->xattr_shared_count; ++i) {
@@ -489,7 +489,7 @@ static int xattr_entrylist(struct xattr_iter *_it, {struct listxattr_iter *it = container_of(_it, struct listxattr_iter, it); -unsigned prefix_len; +unsigned int prefix_len;const char *prefix; const struct xattr_handler *h =
@@ -517,7 +517,7 @@ static int xattr_entrylist(struct xattr_iter *_it, }static int xattr_namelist (struct xattr_iter *_it, -unsigned processed,char *buf,unsigned len) +unsigned int processed,char *buf,unsigned int len) {struct listxattr_iter *it = container_of(_it, struct listxattr_iter, it);
@@ -528,7 +528,7 @@ static int xattr_namelist(struct xattr_iter *_it, }static int xattr_skipvalue (struct xattr_iter *_it, -unsigned value_sz) +unsigned int value_sz) {struct listxattr_iter *it = container_of(_it, struct listxattr_iter, it);
@@ -547,7 +547,7 @@ static const struct xattr_iter_handlers list_xattr_handlers = {static int inline_listxattr (struct listxattr_iter *it) {int ret; -unsigned remaining; +unsigned int remaining; ret =inline_xattr_iter_begin (&it->it,d_inode (it->dentry));if (ret <0 )
@@ -569,7 +569,7 @@ static int shared_listxattr(struct listxattr_iter *it)struct erofs_vnode *const vi =EROFS_V (inode);struct super_block *const sb = inode->i_sb;struct erofs_sb_info *const sbi =EROFS_SB (sb); -unsigned i; +unsigned int i;int ret =0 ;for (i =0 ; i < vi->xattr_shared_count; ++i) {
Signature · 1 line
2.18.0
Hi Thomas,
Thanks for your new patch.
It seems that this patch also introduces 2 new 'WARNING: line over 80 characters', could you please fix it in the patch?
Quoted 90 lines · Thomas Wei?schuh
Changes since v1:
* Removed changes that conflicted with
[PATCH 1/6] staging: erofs: formatting fix inunzip_vle_lz4.c
* Added patch description-- >8 --
Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'" detected by checkpatch.pl
Signed-off-by Thomas Wei?schuh <linux at weissschuh.net>--- drivers/staging/erofs/data.c | 4 +-- drivers/staging/erofs/dir.c | 14 ++++----- drivers/staging/erofs/inode.c | 6 ++-- drivers/staging/erofs/namei.c | 28 +++++++++--------- drivers/staging/erofs/super.c | 2 +- drivers/staging/erofs/unzip_vle.c | 48 +++++++++++++++---------------- drivers/staging/erofs/utils.c | 2 +- drivers/staging/erofs/xattr.c | 40 +++++++++++++------------- 8 files changed, 72 insertions(+), 72 deletions(-)drivers/staging/erofs/data.c +2
-2@@ -202,7 +202,7 @@ static inline struct bio *erofs_read_raw_page(struct address_space *mapping, struct page *page, erofs_off_t *last_block, - unsigned nblocks, + unsigned int nblocks, bool ra) { struct inode *inode = mapping->host;@@ -236,7 +236,7 @@ static inline struct bio *erofs_read_raw_page( .m_la = blknr_to_addr(current_block), };erofs_blk_t blknr; -unsigned blkoff; +unsigned int blkoff; err =erofs_map_blocks (inode, &map,EROFS_GET_BLOCKS_RAW );if (unlikely (err))drivers/staging/erofs/dir.c +6
-6@@ -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))
drivers/staging/erofs/dir.c static int erofs_readdir(struct file *f, struct dir_context *ctx) · line 112
Quoted 5 lines
drivers/staging/erofs/dir.c +1
-1@@ -109,7 +109,7 @@ 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);
WARNING: line over 80 characters
#102: FILE: drivers/staging/erofs/dir.c:112:
+ maxsize = min_t(unsigned int, dirsize - ctx->pos + ofs, PAGE_SIZE);
Quoted 17 lines
drivers/staging/erofs/dir.c +0
-0/* search dirents at the arbitrary position */ if (unlikely (initial)) {drivers/staging/erofs/inode.c +1
-1@@ -19,7 +19,7 @@ static int read_inode(struct inode *inode, void *data) {struct erofs_vnode *vi =EROFS_V (inode);struct erofs_inode_v1 *v1 = data; -const unsigned advise =le16_to_cpu (v1->i_advise); +const unsigned int advise =le16_to_cpu (v1->i_advise); vi->data_mapping_mode =__inode_data_mapping (advise);
drivers/staging/erofs/inode.c static int read_inode(struct inode *inode, void *data) · line 115
Quoted 5 lines
drivers/staging/erofs/inode.c +1
-1@@ -112,7 +112,7 @@ static int read_inode(struct inode *inode, void *data)* try_lock since it takes no much overhead and * will success immediately. */ -static int fill_inline_data (struct inode *inode,void *data,unsigned m_pofs) +static int fill_inline_data (struct inode *inode,void *data,unsigned int m_pofs)
WARNING: line over 80 characters
#124: FILE: drivers/staging/erofs/inode.c:115:
+static int fill_inline_data(struct inode *inode, void *data, unsigned int m_pofs)
Thanks,
Gao Xiang
Hi Thomas,
Quoted 6 lines · Gao Xiang
Hi Thomas,
Thanks for your new patch.
It seems that this patch also introduces 2 new 'WARNING: line over 80 characters', could you please fix it in the patch?
It will be better to fix that.
Some reviewed cleanup patches are merged before this patch, then I failed to add this one, so could you rebase on top of erofs dev branch in below link:
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=erofs
Thanks,
Quoted 133 lines · Thomas Wei?schuh
Quoted 90 lines
Changes since v1:
* Removed changes that conflicted with
[PATCH 1/6] staging: erofs: formatting fix inunzip_vle_lz4.c
* Added patch description-- >8 --
Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'" detected by checkpatch.pl
Signed-off-by Thomas Wei?schuh <linux at weissschuh.net>--- drivers/staging/erofs/data.c | 4 +-- drivers/staging/erofs/dir.c | 14 ++++----- drivers/staging/erofs/inode.c | 6 ++-- drivers/staging/erofs/namei.c | 28 +++++++++--------- drivers/staging/erofs/super.c | 2 +- drivers/staging/erofs/unzip_vle.c | 48 +++++++++++++++---------------- drivers/staging/erofs/utils.c | 2 +- drivers/staging/erofs/xattr.c | 40 +++++++++++++------------- 8 files changed, 72 insertions(+), 72 deletions(-)drivers/staging/erofs/data.c +2
-2@@ -202,7 +202,7 @@ static inline struct bio *erofs_read_raw_page(struct address_space *mapping, struct page *page, erofs_off_t *last_block, - unsigned nblocks, + unsigned int nblocks, bool ra) { struct inode *inode = mapping->host;@@ -236,7 +236,7 @@ static inline struct bio *erofs_read_raw_page( .m_la = blknr_to_addr(current_block), };erofs_blk_t blknr; -unsigned blkoff; +unsigned int blkoff; err =erofs_map_blocks (inode, &map,EROFS_GET_BLOCKS_RAW );if (unlikely (err))drivers/staging/erofs/dir.c +6
-6@@ -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))drivers/staging/erofs/dir.c static int erofs_readdir(struct file *f, struct dir_context *ctx) · line 112
Quoted 5 lines
drivers/staging/erofs/dir.c +1
-1@@ -109,7 +109,7 @@ 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);WARNING: line over 80 characters
#102: FILE:drivers/staging/erofs/dir.c:112:
+ maxsize =min_t(unsigned int, dirsize - ctx->pos + ofs, PAGE_SIZE);Quoted 17 lines
drivers/staging/erofs/dir.c +0
-0/* search dirents at the arbitrary position */ if (unlikely (initial)) {drivers/staging/erofs/inode.c +1
-1@@ -19,7 +19,7 @@ static int read_inode(struct inode *inode, void *data) {struct erofs_vnode *vi =EROFS_V (inode);struct erofs_inode_v1 *v1 = data; -const unsigned advise =le16_to_cpu (v1->i_advise); +const unsigned int advise =le16_to_cpu (v1->i_advise); vi->data_mapping_mode =__inode_data_mapping (advise);drivers/staging/erofs/inode.c static int read_inode(struct inode *inode, void *data) · line 115
Quoted 5 lines
drivers/staging/erofs/inode.c +1
-1@@ -112,7 +112,7 @@ static int read_inode(struct inode *inode, void *data)* try_lock since it takes no much overhead and * will success immediately. */ -static int fill_inline_data (struct inode *inode,void *data,unsigned m_pofs) +static int fill_inline_data (struct inode *inode,void *data,unsigned int m_pofs)WARNING: line over 80 characters
#124: FILE:drivers/staging/erofs/inode.c:115:
+static intfill_inline_data(struct inode *inode, void *data, unsigned int m_pofs)Thanks,
Gao Xiang
PATCH 1/1 MAINTAINERS: add tree location for staging/erofs
In reply to Gao XiangHi Chao, hi Gao,
Quoted 9 lines · Chao Yu
Hi Thomas,
Quoted 6 lines · Gao Xiang
Hi Thomas,
Thanks for your new patch.
It seems that this patch also introduces 2 new 'WARNING: line over 80 characters', could you please fix it in the patch?
@Chao,Gao: For some reason there seems to be a problem when receiving mails from you. The one I received now was the first one from you that reached me directly. Before I only got your messages in the quotes from Dan and now in the quotes from the mail I am responding to.
(I will try to investigate the reason for this)
Sorry for my slow responses before.
Quoted 1 line
It will be better to fix that.
A new patch will shortly follow.
Quoted 4 lines
Some reviewed cleanup patches are merged before this patch, then I failed to add this one, so could you rebase on top of erofs dev branch in below link:
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=erofs
I was not aware of this tree and worked off of staging / next.
A patch is attached to this message that adds the tree to the MAINTAINERS file.
-- >8 --
Currently this location is not documented.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -13747,6 +13747,7 @@ F: drivers/staging/comedi/ STAGING - EROFS FILE SYSTEM M: Gao Xiang <gaoxiang25 at huawei.com> M: Chao Yu <yuchao0 at huawei.com> +T: git git://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git erofs L: linux-erofs at lists.ozlabs.org S: Maintained F: drivers/staging/erofs/
Signature · 1 line
2.18.0
Re: [PATCH] MAINTAINERS: add tree location for staging/erofs
Quoted 25 lines · Thomas Wei?schuh
Hi Chao, hi Gao,
Quoted 9 lines · Chao Yu
Hi Thomas,
Quoted 6 lines · Gao Xiang
Hi Thomas,
Thanks for your new patch.
It seems that this patch also introduces 2 new 'WARNING: line over 80 characters', could you please fix it in the patch?
@Chao,Gao: For some reason there seems to be a problem when receiving mails from you. The one I received now was the first one from you that reached me directly. Before I only got your messages in the quotes from Dan and now in the quotes from the mail I am responding to.
(I will try to investigate the reason for this)Sorry for my slow responses before.
Quoted 1 line
It will be better to fix that.
A new patch will shortly follow.
Quoted 7 lines
Quoted 4 lines
Some reviewed cleanup patches are merged before this patch, then I failed to add this one, so could you rebase on top of erofs dev branch in below link:
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=erofs
I was not aware of this tree and worked off of staging / next.
A patch is attached to this message that adds the tree to theMAINTAINERSfile.
Hi Chao,
I think this tree has some PREVIEW patches which preview in linux-erofs mailing list only and doesn't send to staging mailing list and LKML,
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=erofs
so erofs tree is actually Greg's staging tree.
Quoted 15 lines
-- >8 --
Currently this location is not documented.
Signed-off-by Thomas Wei?schuh <linux at weissschuh.net>--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)MAINTAINERS +0
-0
MAINTAINERS F: drivers/staging/comedi/ · line 13750
Quoted 4 lines
MAINTAINERS +1
-0@@ -13747,6 +13747,7 @@ F: drivers/staging/comedi/ STAGING - EROFS FILE SYSTEM M: Gao Xiang <gaoxiang25 at huawei.com> M: Chao Yu <yuchao0 at huawei.com> +T: git git://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git erofs
Hi Thomas,
nope, the erofs tree is actually the same as staging tree, so any patch should be based on Greg's upstream tree.
Thanks,
Gao Xiang
Quoted 4 lines
MAINTAINERS +0
-0L: linux-erofs at lists.ozlabs.org S: Maintained F: drivers/staging/erofs/
Re: [PATCH] MAINTAINERS: add tree location for staging/erofs
Quoted 36 lines · Gao Xiang
Quoted 25 lines · Thomas Wei?schuh
Hi Chao, hi Gao,
Quoted 9 lines · Chao Yu
Hi Thomas,
Quoted 6 lines · Gao Xiang
Hi Thomas,
Thanks for your new patch.
It seems that this patch also introduces 2 new 'WARNING: line over 80 characters', could you please fix it in the patch?
@Chao,Gao: For some reason there seems to be a problem when receiving mails from you. The one I received now was the first one from you that reached me directly. Before I only got your messages in the quotes from Dan and now in the quotes from the mail I am responding to.
(I will try to investigate the reason for this)Sorry for my slow responses before.
Quoted 1 line
It will be better to fix that.
A new patch will shortly follow.
Quoted 7 lines
Quoted 4 lines
Some reviewed cleanup patches are merged before this patch, then I failed to add this one, so could you rebase on top of erofs dev branch in below link:
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=erofs
I was not aware of this tree and worked off of staging / next.
A patch is attached to this message that adds the tree to theMAINTAINERSfile.
Quoted 8 lines
Hi Chao,
I think this tree has some PREVIEW patches which preview in linux-erofs mailing list only and doesn't send to staging mailing list and LKML,
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=erofs
so erofs tree is actually Greg's staging tree.
Thomas,
I confirmed that erofs git repository for linux upstream is Greg's staging tree.
Let me explain, in order to avoid sending buggy or preview patch, Xiang and me plan to review patches in erofs mailing list first, and then cache reviewed patches in my git tree before sending them to Greg and staging mailing list.
Based on that, I'm trying to serialize all erofs patches, expecting that can help those patches sent to staging mailing list can be merged by Greg with lesser conflict. But I made a mistake that my erofs branch has merged some pending patches, result in failing to merge yours, that mislead me to ask you to rebase the code, sorry about that.
Now I can confirm that your v2 patch can apply on Greg's staging-next, so fixing warning reported by checkpatch.pl on your v2 patch is enough. :)
Thanks,
Quoted 32 lines
Quoted 16 lines
-- >8 --
Currently this location is not documented.
Signed-off-by Thomas Wei?schuh <linux at weissschuh.net>--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)MAINTAINERS +0
-0MAINTAINERS F: drivers/staging/comedi/ · line 13750
Quoted 4 lines
MAINTAINERS +1
-0@@ -13747,6 +13747,7 @@ F: drivers/staging/comedi/ STAGING - EROFS FILE SYSTEM M: Gao Xiang <gaoxiang25 at huawei.com> M: Chao Yu <yuchao0 at huawei.com> +T: git git://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git erofsHi Thomas,
nope, the erofs tree is actually the same as staging tree, so any patch should be based on Greg's upstream tree.Thanks,
Gao XiangQuoted 4 lines
MAINTAINERS +0
-0L: linux-erofs at lists.ozlabs.org S: Maintained F: drivers/staging/erofs/
Re: [PATCH] MAINTAINERS: add tree location for staging/erofs
Hi Thomas,
Quoted 54 lines · Chao Yu
Quoted 36 lines · Gao Xiang
Quoted 25 lines · Thomas Wei?schuh
Hi Chao, hi Gao,
Quoted 9 lines · Chao Yu
Hi Thomas,
Quoted 6 lines · Gao Xiang
Hi Thomas,
Thanks for your new patch.
It seems that this patch also introduces 2 new 'WARNING: line over 80 characters', could you please fix it in the patch?
@Chao,Gao: For some reason there seems to be a problem when receiving mails from you. The one I received now was the first one from you that reached me directly. Before I only got your messages in the quotes from Dan and now in the quotes from the mail I am responding to.
(I will try to investigate the reason for this)Sorry for my slow responses before.
Quoted 1 line
It will be better to fix that.
A new patch will shortly follow.
Quoted 7 lines
Quoted 4 lines
Some reviewed cleanup patches are merged before this patch, then I failed to add this one, so could you rebase on top of erofs dev branch in below link:
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=erofs
I was not aware of this tree and worked off of staging / next.
A patch is attached to this message that adds the tree to theMAINTAINERSfile.Quoted 8 lines
Hi Chao,
I think this tree has some PREVIEW patches which preview in linux-erofs mailing list only and doesn't send to staging mailing list and LKML,
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=erofs
so erofs tree is actually Greg's staging tree.
Thomas,
I confirmed that erofs git repository for linux upstream is Greg's staging tree.
Let me explain, in order to avoid sending buggy or preview patch, Xiang and me plan to review patches in erofs mailing list first, and then cache reviewed patches in my git tree before sending them to Greg and staging mailing list.
Quoted 5 lines
Based on that, I'm trying to serialize all erofs patches, expecting that can help those patches sent to staging mailing list can be merged by Greg with lesser conflict. But I made a mistake that my erofs branch has merged some pending patches, result in failing to merge yours, that mislead me to ask you to rebase the code, sorry about that.
As Chao's said, we keep on fetching the latest Greg's staging tree and develop , preview, and test new erofs features and bugfix based on it.
For the cleanup patches, it could be better directly based on Greg's upstream staging tree. We will then rebase our developping code on your work. :)
Quoted 3 lines
Now I can confirm that your v2 patch can apply on Greg's staging-next, so fixing warning reported by checkpatch.pl on your v2 patch is enough. :)
Yes, we are sorry about that. could you please send v4 patch which follows Greg's and Chao's suggestions?
Thanks,
Gao Xiang
Quoted 35 lines
Thanks,
Quoted 32 lines
Quoted 16 lines
-- >8 --
Currently this location is not documented.
Signed-off-by Thomas Wei?schuh <linux at weissschuh.net>--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)MAINTAINERS +0
-0MAINTAINERS F: drivers/staging/comedi/ · line 13750
Quoted 4 lines
MAINTAINERS +1
-0@@ -13747,6 +13747,7 @@ F: drivers/staging/comedi/ STAGING - EROFS FILE SYSTEM M: Gao Xiang <gaoxiang25 at huawei.com> M: Chao Yu <yuchao0 at huawei.com> +T: git git://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git erofsHi Thomas,
nope, the erofs tree is actually the same as staging tree, so any patch should be based on Greg's upstream tree.Thanks,
Gao XiangQuoted 4 lines
MAINTAINERS +0
-0L: linux-erofs at lists.ozlabs.org S: Maintained F: drivers/staging/erofs/
PATCH v4 1/1 staging: erofs: use explicit unsigned int type
In reply to Chao YuHi Chao,
Quoted 22 lines · Chao Yu
[...]
Quoted 11 lines
Quoted 2 lines
I was not aware of this tree and worked off of staging / next.
A patch is attached to this message that adds the tree to theMAINTAINERSfile.Hi Chao,
I think this tree has some PREVIEW patches which preview in linux-erofs mailing list only and doesn't send to staging mailing list and LKML,
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=erofs
so erofs tree is actually Greg's staging tree.
Thomas,
I confirmed that erofs git repository for linux upstream is Greg's staging tree.
Let me explain, in order to avoid sending buggy or preview patch, Xiang and me plan to review patches in erofs mailing list first, and then cache reviewed patches in my git tree before sending them to Greg and staging mailing list.
Quoted 5 lines
Based on that, I'm trying to serialize all erofs patches, expecting that can help those patches sent to staging mailing list can be merged by Greg with lesser conflict. But I made a mistake that my erofs branch has merged some pending patches, result in failing to merge yours, that mislead me to ask you to rebase the code, sorry about that.
Thank you for clearing this up! And I am sorry for causing you all this work for what is essentially a very small style cleanup.
Quoted 2 lines
Now I can confirm that your v2 patch can apply on Greg's staging-next, so fixing warning reported by checkpatch.pl on your v2 patch is enough. :)
The patch follows.
Thomas
Changes since v1:
* Removed changes that conflicted with
[PATCH 1/6] staging: erofs: formatting fix in unzip_vle_lz4.c
* Added patch description
Changes since v2:
* Fixed conflicts with other patchsets
* Don't introduce new style issues
Changes since v3:
* Fixed conflicts with other patchsets
Note: This patchset should be applied with the "git am --scissors", to remove the historic information and this note.
-- >8 --
Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'" detected by checkpatch.pl.
--- drivers/staging/erofs/data.c | 4 +-- drivers/staging/erofs/dir.c | 15 +++++----- drivers/staging/erofs/inode.c | 7 +++-- drivers/staging/erofs/namei.c | 28 +++++++++--------- drivers/staging/erofs/super.c | 2 +- drivers/staging/erofs/unzip_vle.c | 48 +++++++++++++++---------------- drivers/staging/erofs/utils.c | 2 +- drivers/staging/erofs/xattr.c | 44 ++++++++++++++-------------- 8 files changed, 76 insertions(+), 74 deletions(-)
drivers/staging/erofs/data.c +2 -2
@@ -202,7 +202,7 @@ static inline struct bio *erofs_read_raw_page(struct address_space *mapping, struct page *page, erofs_off_t *last_block, - unsigned nblocks, + unsigned int nblocks, bool ra) { struct inode *inode = mapping->host;
@@ -236,7 +236,7 @@ static inline struct bio *erofs_read_raw_page( .m_la = blknr_to_addr(current_block), };erofs_blk_t blknr; -unsigned blkoff; +unsigned int blkoff; err =erofs_map_blocks (inode, &map,EROFS_GET_BLOCKS_RAW );if (unlikely (err))
drivers/staging/erofs/dir.c +8 -7
@@ -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)) {
drivers/staging/erofs/inode.c +4 -3
@@ -19,7 +19,7 @@ static int read_inode(struct inode *inode, void *data) {struct erofs_vnode *vi =EROFS_V (inode);struct erofs_inode_v1 *v1 = data; -const unsigned advise =le16_to_cpu (v1->i_advise); +const unsigned int advise =le16_to_cpu (v1->i_advise); vi->data_mapping_mode =__inode_data_mapping (advise);
@@ -112,7 +112,8 @@ static int read_inode(struct inode *inode, void *data)* try_lock since it takes no much overhead and * will success immediately. */ -static int fill_inline_data (struct inode *inode,void *data,unsigned m_pofs) +static int fill_inline_data (struct inode *inode,void *data, +unsigned int m_pofs) {struct erofs_vnode *vi =EROFS_V (inode);struct erofs_sb_info *sbi =EROFS_I_SB (inode);
@@ -152,7 +153,7 @@ static int fill_inode(struct inode *inode, int isdir)void *data;int err;erofs_blk_t blkaddr; -unsigned ofs; +unsigned int ofs;trace_erofs_fill_inode (inode, isdir);
drivers/staging/erofs/namei.c +14 -14
@@ -17,9 +17,9 @@/* based on the value of qn->len is accurate */ static inline int dirnamecmp (struct qstr *qn, -struct qstr *qd,unsigned *matched) +struct qstr *qd,unsigned int *matched) { -unsigned i = *matched, len =min (qn->len, qd->len); +unsigned int i = *matched, len =min (qn->len, qd->len); loop:if (unlikely (i >= len)) { *matched = i;
@@ -46,8 +46,8 @@ static struct erofs_dirent *find_target_dirent(struct qstr *name, u8 *data, int maxsize) { - unsigned ndirents, head, back; -unsigned startprfx, endprfx; + unsigned int ndirents, head, back; +unsigned int startprfx, endprfx;struct erofs_dirent *const de = (struct erofs_dirent *)data;/* make sure that maxsize is valid */
@@ -63,9 +63,9 @@ static struct erofs_dirent *find_target_dirent( startprfx = endprfx =0 ;while (head <= back) { -unsigned mid = head + (back - head) /2 ; -unsigned nameoff =le16_to_cpu (de[mid].nameoff); -unsigned matched =min (startprfx, endprfx); +unsigned int mid = head + (back - head) /2 ; +unsigned int nameoff =le16_to_cpu (de[mid].nameoff); +unsigned int matched =min (startprfx, endprfx); struct qstr dname = QSTR_INIT(data + nameoff, unlikely(mid >= ndirents - 1) ?
@@ -95,8 +95,8 @@ static struct page *find_target_block_classic(struct inode *dir, struct qstr *name, int *_diff) { - unsigned startprfx, endprfx; -unsigned head, back; + unsigned int startprfx, endprfx; +unsigned int head, back;struct address_space *const mapping = dir->i_mapping;struct page *candidate =ERR_PTR (-ENOENT );
@@ -105,7 +105,7 @@ static struct page *find_target_block_classic( back =inode_datablocks (dir) -1 ;while (head <= back) { -unsigned mid = head + (back - head) /2 ; +unsigned int mid = head + (back - head) /2 ;struct page *page =read_mapping_page (mapping, mid,NULL );if (IS_ERR (page)) {
@@ -115,10 +115,10 @@ static struct page *find_target_block_classic(return page; }else {int diff; -unsigned ndirents, matched; +unsigned int ndirents, matched;struct qstr dname;struct erofs_dirent *de =kmap_atomic (page); -unsigned nameoff =le16_to_cpu (de->nameoff); +unsigned int nameoff =le16_to_cpu (de->nameoff); ndirents = nameoff /sizeof (*de);
@@ -164,7 +164,7 @@ static struct page *find_target_block_classic(int erofs_namei (struct inode *dir,struct qstr *name, -erofs_nid_t *nid,unsigned *d_type) +erofs_nid_t *nid,unsigned int *d_type) {int diff;struct page *page;
@@ -204,7 +204,7 @@ static struct dentry *erofs_lookup(struct inode *dir, {int err;erofs_nid_t nid; -unsigned d_type; +unsigned int d_type;struct inode *inode;DBG_BUGON (!d_really_is_negative (dentry));
drivers/staging/erofs/super.c +1 -1
@@ -81,7 +81,7 @@ static int superblock_read(struct super_block *sb)struct erofs_sb_info *sbi;struct buffer_head *bh;struct erofs_super_block *layout; -unsigned blkszbits; +unsigned int blkszbits;int ret; bh =sb_bread (sb,0 );
drivers/staging/erofs/unzip_vle.c +24 -24
175 lines not on this page · raw message
drivers/staging/erofs/utils.c +1 -1
@@ -120,7 +120,7 @@ unsigned long erofs_shrink_workstation(struct erofs_sb_info *sbi, {pgoff_t first_index =0 ;void *batch[PAGEVEC_SIZE ]; -unsigned freed =0 ; +unsigned int freed =0 ;int i, found; repeat:
drivers/staging/erofs/xattr.c +22 -22
152 lines not on this page · raw message
Signature · 1 line
2.18.0
Quoted 60 lines · Thomas Wei?schuh
Hi Chao,
Quoted 22 lines · Chao Yu
[...]
Quoted 11 lines
Quoted 2 lines
I was not aware of this tree and worked off of staging / next.
A patch is attached to this message that adds the tree to theMAINTAINERSfile.Hi Chao,
I think this tree has some PREVIEW patches which preview in linux-erofs mailing list only and doesn't send to staging mailing list and LKML,
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=erofs
so erofs tree is actually Greg's staging tree.
Thomas,
I confirmed that erofs git repository for linux upstream is Greg's staging tree.
Let me explain, in order to avoid sending buggy or preview patch, Xiang and me plan to review patches in erofs mailing list first, and then cache reviewed patches in my git tree before sending them to Greg and staging mailing list.
Quoted 5 lines
Based on that, I'm trying to serialize all erofs patches, expecting that can help those patches sent to staging mailing list can be merged by Greg with lesser conflict. But I made a mistake that my erofs branch has merged some pending patches, result in failing to merge yours, that mislead me to ask you to rebase the code, sorry about that.
Thank you for clearing this up! And I am sorry for causing you all this work for what is essentially a very small style cleanup.
Quoted 2 lines
Now I can confirm that your v2 patch can apply on Greg's staging-next, so fixing warning reported by checkpatch.pl on your v2 patch is enough. :)
The patch follows.
Thomas
Changes since v1:
* Removed changes that conflicted with
[PATCH 1/6] staging: erofs: formatting fix inunzip_vle_lz4.c
* Added patch descriptionChanges since v2:
* Fixed conflicts with other patchsets
* Don't introduce new style issuesChanges since v3:
* Fixed conflicts with other patchsets
Note: This patchset should be applied with the "git am --scissors", to remove the historic information and this note.
Quoted 6 lines
-- >8 --
Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'" detected by checkpatch.pl.
Signed-off-by Thomas Wei?schuh <linux at weissschuh.net>
Thanks,
Hi Thomas,
Quoted 27 lines · Thomas Wei?schuh
Hi Chao,
Quoted 19 lines · Chao Yu
[...]
Quoted 10 lines
Quoted 2 lines
I was not aware of this tree and worked off of staging / next.
A patch is attached to this message that adds the tree to theMAINTAINERSfile.Hi Chao,
I think this tree has some PREVIEW patches which preview in linux-erofs mailing list only and doesn't send to staging mailing list and LKML,
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=erofs
so erofs tree is actually Greg's staging tree.
Thomas,
I confirmed that erofs git repository for linux upstream is Greg's staging tree.
Let me explain, in order to avoid sending buggy or preview patch, Xiang and me plan to review patches in erofs mailing list first, and then cache reviewed patches in my git tree before sending them to Greg and staging mailing list.
Quoted 5 lines
Based on that, I'm trying to serialize all erofs patches, expecting that can help those patches sent to staging mailing list can be merged by Greg with lesser conflict. But I made a mistake that my erofs branch has merged some pending patches, result in failing to merge yours, that mislead me to ask you to rebase the code, sorry about that.
Quoted 8 lines
Thank you for clearing this up! And I am sorry for causing you all this work for what is essentially a very small style cleanup.
Quoted 2 lines
Now I can confirm that your v2 patch can apply on Greg's staging-next, so fixing warning reported by checkpatch.pl on your v2 patch is enough. :)
The patch follows.
Thomas
Could you please resend your patch seperately? Because it will be easier for Greg to merge.
Quoted 13 lines
Changes since v1:
* Removed changes that conflicted with
[PATCH 1/6] staging: erofs: formatting fix inunzip_vle_lz4.c
* Added patch descriptionChanges since v2:
* Fixed conflicts with other patchsets
* Don't introduce new style issues
Quoted 8 lines
Changes since v3:
* Fixed conflicts with other patchsets
Note: This patchset should be applied with the "git am --scissors", to remove the historic information and this note.
-- >8 --
I personally think that is not the correct kernel patch style.
Just as Greg's said,
Quoted 1 line
These changes belong below the --- line, not above it.
For reference, it will help the patch quickly get merged. ;)
and you could add,
Reviewed-by: Gao Xiang <gaoxiang25 at huawei.com>
Thanks,
Gao Xiang
Quoted 5 lines
Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'" detected by checkpatch.pl.
Signed-off-by Thomas Wei?schuh <linux at weissschuh.net>
Hi Thomas,
ping...
Quoted 70 lines · Gao Xiang
Hi Thomas,
Quoted 27 lines · Thomas Wei?schuh
Hi Chao,
Quoted 19 lines · Chao Yu
[...]
Quoted 10 lines
Quoted 2 lines
I was not aware of this tree and worked off of staging / next.
A patch is attached to this message that adds the tree to theMAINTAINERSfile.Hi Chao,
I think this tree has some PREVIEW patches which preview in linux-erofs mailing list only and doesn't send to staging mailing list and LKML,
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/log/?h=erofs
so erofs tree is actually Greg's staging tree.
Thomas,
I confirmed that erofs git repository for linux upstream is Greg's staging tree.
Let me explain, in order to avoid sending buggy or preview patch, Xiang and me plan to review patches in erofs mailing list first, and then cache reviewed patches in my git tree before sending them to Greg and staging mailing list.
Quoted 5 lines
Based on that, I'm trying to serialize all erofs patches, expecting that can help those patches sent to staging mailing list can be merged by Greg with lesser conflict. But I made a mistake that my erofs branch has merged some pending patches, result in failing to merge yours, that mislead me to ask you to rebase the code, sorry about that.
Quoted 8 lines
Thank you for clearing this up! And I am sorry for causing you all this work for what is essentially a very small style cleanup.
Quoted 2 lines
Now I can confirm that your v2 patch can apply on Greg's staging-next, so fixing warning reported by checkpatch.pl on your v2 patch is enough. :)
The patch follows.
Thomas
Could you please resend your patch seperately? Because it will be easier for Greg to merge.
Quoted 13 lines
Changes since v1:
* Removed changes that conflicted with
[PATCH 1/6] staging: erofs: formatting fix inunzip_vle_lz4.c
* Added patch descriptionChanges since v2:
* Fixed conflicts with other patchsets
* Don't introduce new style issuesQuoted 8 lines
Changes since v3:
* Fixed conflicts with other patchsets
Note: This patchset should be applied with the "git am --scissors", to remove the historic information and this note.
-- >8 --
I personally think that is not the correct kernel patch style.
Just as Greg's said,
Quoted 1 line
These changes belong below the --- line, not above it.
Quoted 8 lines
For reference, it will help the patch quickly get merged. ;)
and you could add,
Reviewed-by: Gao Xiang <gaoxiang25 at huawei.com>Thanks,
Gao Xiang
and HUAWEI email server cannot send my all emails to your mailbox successfully. Since you change a lot of files,I need to rebase my rest preview patches one by one right now.
Could you please resend a acceptable independent final patch for Greg? :)
Thanks,
Gao Xiang
Quoted 10 lines
Quoted 5 lines
Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'" detected by checkpatch.pl.
Signed-off-by Thomas Wei?schuh <linux at weissschuh.net>_______________________________________________
devel mailing list
devel at linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH v3 1/1 staging: erofs: use explicit unsigned int type
In reply to Gao XiangChanges since v1:
* Removed changes that conflicted with
[PATCH 1/6] staging: erofs: formatting fix in unzip_vle_lz4.c
* Added patch description
Changes since v2:
* Fixed conflicts with other patchsets
* Don't introduce new style issues
-- >8 --
Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'" detected by checkpatch.pl.
--- drivers/staging/erofs/data.c | 4 +-- drivers/staging/erofs/dir.c | 15 ++++++----- drivers/staging/erofs/inode.c | 7 ++--- drivers/staging/erofs/namei.c | 28 ++++++++++---------- drivers/staging/erofs/super.c | 2 +- drivers/staging/erofs/unzip_vle.c | 42 ++++++++++++++--------------- drivers/staging/erofs/utils.c | 2 +- drivers/staging/erofs/xattr.c | 44 +++++++++++++++---------------- 8 files changed, 73 insertions(+), 71 deletions(-)
drivers/staging/erofs/data.c +2 -2
@@ -211,7 +211,7 @@ static inline struct bio *erofs_read_raw_page(struct address_space *mapping, struct page *page, erofs_off_t *last_block, - unsigned nblocks, + unsigned int nblocks, bool ra) { struct inode *inode = mapping->host;
@@ -245,7 +245,7 @@ static inline struct bio *erofs_read_raw_page( .m_la = blknr_to_addr(current_block), };erofs_blk_t blknr; -unsigned blkoff; +unsigned int blkoff; err =erofs_map_blocks (inode, &map,EROFS_GET_BLOCKS_RAW );if (unlikely (err))
drivers/staging/erofs/dir.c +8 -7
@@ -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)) {
drivers/staging/erofs/inode.c +4 -3
@@ -19,7 +19,7 @@ static int read_inode(struct inode *inode, void *data) {struct erofs_vnode *vi =EROFS_V (inode);struct erofs_inode_v1 *v1 = data; -const unsigned advise =le16_to_cpu (v1->i_advise); +const unsigned int advise =le16_to_cpu (v1->i_advise); vi->data_mapping_mode =__inode_data_mapping (advise);
@@ -112,7 +112,8 @@ static int read_inode(struct inode *inode, void *data)* try_lock since it takes no much overhead and * will success immediately. */ -static int fill_inline_data (struct inode *inode,void *data,unsigned m_pofs) +static int fill_inline_data (struct inode *inode,void *data, +unsigned int m_pofs) {struct erofs_vnode *vi =EROFS_V (inode);struct erofs_sb_info *sbi =EROFS_I_SB (inode);
@@ -152,7 +153,7 @@ static int fill_inode(struct inode *inode, int isdir)void *data;int err;erofs_blk_t blkaddr; -unsigned ofs; +unsigned int ofs;trace_erofs_fill_inode (inode, isdir);
drivers/staging/erofs/namei.c +14 -14
@@ -17,9 +17,9 @@/* based on the value of qn->len is accurate */ static inline int dirnamecmp (struct qstr *qn, -struct qstr *qd,unsigned *matched) +struct qstr *qd,unsigned int *matched) { -unsigned i = *matched, len =min (qn->len, qd->len); +unsigned int i = *matched, len =min (qn->len, qd->len); loop:if (unlikely (i >= len)) { *matched = i;
@@ -46,8 +46,8 @@ static struct erofs_dirent *find_target_dirent(struct qstr *name, u8 *data, int maxsize) { - unsigned ndirents, head, back; -unsigned startprfx, endprfx; + unsigned int ndirents, head, back; +unsigned int startprfx, endprfx;struct erofs_dirent *const de = (struct erofs_dirent *)data;/* make sure that maxsize is valid */
@@ -63,9 +63,9 @@ static struct erofs_dirent *find_target_dirent( startprfx = endprfx =0 ;while (head <= back) { -unsigned mid = head + (back - head) /2 ; -unsigned nameoff =le16_to_cpu (de[mid].nameoff); -unsigned matched =min (startprfx, endprfx); +unsigned int mid = head + (back - head) /2 ; +unsigned int nameoff =le16_to_cpu (de[mid].nameoff); +unsigned int matched =min (startprfx, endprfx); struct qstr dname = QSTR_INIT(data + nameoff, unlikely(mid >= ndirents - 1) ?
@@ -95,8 +95,8 @@ static struct page *find_target_block_classic(struct inode *dir, struct qstr *name, int *_diff) { - unsigned startprfx, endprfx; -unsigned head, back; + unsigned int startprfx, endprfx; +unsigned int head, back;struct address_space *const mapping = dir->i_mapping;struct page *candidate =ERR_PTR (-ENOENT );
@@ -105,7 +105,7 @@ static struct page *find_target_block_classic( back =inode_datablocks (dir) -1 ;while (head <= back) { -unsigned mid = head + (back - head) /2 ; +unsigned int mid = head + (back - head) /2 ;struct page *page =read_mapping_page (mapping, mid,NULL );if (IS_ERR (page)) {
@@ -115,10 +115,10 @@ static struct page *find_target_block_classic(return page; }else {int diff; -unsigned ndirents, matched; +unsigned int ndirents, matched;struct qstr dname;struct erofs_dirent *de =kmap_atomic (page); -unsigned nameoff =le16_to_cpu (de->nameoff); +unsigned int nameoff =le16_to_cpu (de->nameoff); ndirents = nameoff /sizeof (*de);
@@ -164,7 +164,7 @@ static struct page *find_target_block_classic(int erofs_namei (struct inode *dir,struct qstr *name, -erofs_nid_t *nid,unsigned *d_type) +erofs_nid_t *nid,unsigned int *d_type) {int diff;struct page *page;
@@ -204,7 +204,7 @@ static struct dentry *erofs_lookup(struct inode *dir, {int err;erofs_nid_t nid; -unsigned d_type; +unsigned int d_type;struct inode *inode;DBG_BUGON (!d_really_is_negative (dentry));
drivers/staging/erofs/super.c +1 -1
@@ -81,7 +81,7 @@ static int superblock_read(struct super_block *sb)struct erofs_sb_info *sbi;struct buffer_head *bh;struct erofs_super_block *layout; -unsigned blkszbits; +unsigned int blkszbits;int ret; bh =sb_bread (sb,0 );
drivers/staging/erofs/unzip_vle.c +21 -21
156 lines not on this page · raw message
drivers/staging/erofs/utils.c +1 -1
@@ -120,7 +120,7 @@ unsigned long erofs_shrink_workstation(struct erofs_sb_info *sbi, {pgoff_t first_index =0 ;void *batch[PAGEVEC_SIZE ]; -unsigned freed =0 ; +unsigned int freed =0 ;int i, found; repeat:
drivers/staging/erofs/xattr.c +22 -22
152 lines not on this page · raw message
Signature · 1 line
2.18.0
Greg Kroah-Hartman
maintainerQuoted 11 lines · Thomas Wei?schuh
Changes since v1:
* Removed changes that conflicted with
[PATCH 1/6] staging: erofs: formatting fix inunzip_vle_lz4.c
* Added patch descriptionChanges since v2:
* Fixed conflicts with other patchsets
* Don't introduce new style issues
These changes belong below the --- line, not above it. I'm not sure if git will handle this line:
Quoted 1 line
-- >8 --
Correctly or not, have you tried it?
thanks,
greg k-h
Hi Greg,
Quoted 7 lines · Greg Kroah-Hartman
Quoted 6 lines · Thomas Wei?schuh
Changes since v1:
* Removed changes that conflicted with
[PATCH 1/6] staging: erofs: formatting fix inunzip_vle_lz4.c
* Added patch description
Quoted 11 lines
Quoted 5 lines
Changes since v2:
* Fixed conflicts with other patchsets
* Don't introduce new style issuesThese changes belong below the --- line, not above it. I'm not sure if git will handle this line:
Quoted 1 line
-- >8 --
The patch was supposed to be applied with "git am --scissors". To be honest, I am not sure if the scissors feature of git is to be used for kernel development, or if I should have announced it.
If is not applicable I will be happy to resend the patch in another format.
The documentation for git-mailinfo(1) sounded it would fit my usecase perfectly:
...
This is useful if you want to begin your message in a discussion thread with comments and suggestions on the message you are responding to, and to conclude it with a patch submission, separating the discussion and the beginning of the proposed commit log message with a scissors line.
...
Quoted 1 line
Correctly or not, have you tried it?
I tried to both apply and compile the patch, both succeeded.
Thomas