* [PATCH] erofs-utils: avoid using old compatibility type uint [not found] <20200324081949.26355-1-hsiangkao.ref@aol.com> @ 2020-03-24 8:19 ` Gao Xiang via Linux-erofs 2020-03-26 16:19 ` Li GuiFu via Linux-erofs 2020-03-27 7:41 ` Chao Yu 0 siblings, 2 replies; 3+ messages in thread From: Gao Xiang via Linux-erofs @ 2020-03-24 8:19 UTC (permalink / raw) To: linux-erofs, Li Guifu, Li GuiFu This should fix the following buildroot autobuild issues with some configration on ARM platform [1]: compress.c: In function 'vle_compress_one': compress.c:209:10: error: unknown type name 'uint' const uint qh_aligned = round_down(ctx->head, EROFS_BLKSIZ); ^~~~ compress.c:210:10: error: unknown type name 'uint' const uint qh_after = ctx->head - qh_aligned; ^~~~ compress.c: In function 'z_erofs_convert_to_compacted_format': compress.c:313:8: error: unknown type name 'uint' const uint headerpos = Z_EROFS_VLE_EXTENT_ALIGN(inode->inode_isize + ^~~~ compress.c:316:8: error: unknown type name 'uint' const uint totalidx = (legacymetasize - ^~~~ [1] http://autobuild.buildroot.net/results/842a3c6416416d7badf4db9f38e3b231093a786a Signed-off-by: Gao Xiang <hsiangkao@aol.com> --- lib/compress.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/compress.c b/lib/compress.c index b14ff17..6cc68ed 100644 --- a/lib/compress.c +++ b/lib/compress.c @@ -204,8 +204,9 @@ nocompression: len -= count; if (!final && ctx->head >= EROFS_CONFIG_COMPR_MAX_SZ) { - const uint qh_aligned = round_down(ctx->head, EROFS_BLKSIZ); - const uint qh_after = ctx->head - qh_aligned; + const unsigned int qh_aligned = + round_down(ctx->head, EROFS_BLKSIZ); + const unsigned int qh_after = ctx->head - qh_aligned; memmove(ctx->queue, ctx->queue + qh_aligned, len + qh_after); @@ -308,11 +309,11 @@ int z_erofs_convert_to_compacted_format(struct erofs_inode *inode, unsigned int legacymetasize, unsigned int logical_clusterbits) { - const uint headerpos = Z_EROFS_VLE_EXTENT_ALIGN(inode->inode_isize + - inode->xattr_isize) + - sizeof(struct z_erofs_map_header); - const uint totalidx = (legacymetasize - - Z_EROFS_LEGACY_MAP_HEADER_SIZE) / 8; + const unsigned int mpos = Z_EROFS_VLE_EXTENT_ALIGN(inode->inode_isize + + inode->xattr_isize) + + sizeof(struct z_erofs_map_header); + const unsigned int totalidx = (legacymetasize - + Z_EROFS_LEGACY_MAP_HEADER_SIZE) / 8; u8 *out, *in; struct z_erofs_compressindex_vec cv[16]; /* # of 8-byte units so that it can be aligned with 32 bytes */ @@ -324,7 +325,7 @@ int z_erofs_convert_to_compacted_format(struct erofs_inode *inode, if (logical_clusterbits > 14) /* currently not supported */ return -ENOTSUP; if (logical_clusterbits == 12) { - compacted_4b_initial = (32 - headerpos % 32) / 4; + compacted_4b_initial = (32 - mpos % 32) / 4; if (compacted_4b_initial == 32 / 4) compacted_4b_initial = 0; -- 2.20.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] erofs-utils: avoid using old compatibility type uint 2020-03-24 8:19 ` [PATCH] erofs-utils: avoid using old compatibility type uint Gao Xiang via Linux-erofs @ 2020-03-26 16:19 ` Li GuiFu via Linux-erofs 2020-03-27 7:41 ` Chao Yu 1 sibling, 0 replies; 3+ messages in thread From: Li GuiFu via Linux-erofs @ 2020-03-26 16:19 UTC (permalink / raw) To: Gao Xiang, linux-erofs, Li Guifu On 2020/3/24 16:19, Gao Xiang wrote: > This should fix the following buildroot autobuild issues > with some configration on ARM platform [1]: > > compress.c: In function 'vle_compress_one': > compress.c:209:10: error: unknown type name 'uint' > const uint qh_aligned = round_down(ctx->head, EROFS_BLKSIZ); > ^~~~ > compress.c:210:10: error: unknown type name 'uint' > const uint qh_after = ctx->head - qh_aligned; > ^~~~ > compress.c: In function 'z_erofs_convert_to_compacted_format': > compress.c:313:8: error: unknown type name 'uint' > const uint headerpos = Z_EROFS_VLE_EXTENT_ALIGN(inode->inode_isize + > ^~~~ > compress.c:316:8: error: unknown type name 'uint' > const uint totalidx = (legacymetasize - > ^~~~ > > [1] http://autobuild.buildroot.net/results/842a3c6416416d7badf4db9f38e3b231093a786a > Signed-off-by: Gao Xiang <hsiangkao@aol.com> It looks good Reviewed-by: Li Guifu <bluce.lee@aliyun.com> Thanks ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] erofs-utils: avoid using old compatibility type uint 2020-03-24 8:19 ` [PATCH] erofs-utils: avoid using old compatibility type uint Gao Xiang via Linux-erofs 2020-03-26 16:19 ` Li GuiFu via Linux-erofs @ 2020-03-27 7:41 ` Chao Yu 1 sibling, 0 replies; 3+ messages in thread From: Chao Yu @ 2020-03-27 7:41 UTC (permalink / raw) To: Gao Xiang, linux-erofs, Li Guifu, Li GuiFu On 2020/3/24 16:19, Gao Xiang via Linux-erofs wrote: > This should fix the following buildroot autobuild issues > with some configration on ARM platform [1]: > > compress.c: In function 'vle_compress_one': > compress.c:209:10: error: unknown type name 'uint' > const uint qh_aligned = round_down(ctx->head, EROFS_BLKSIZ); > ^~~~ > compress.c:210:10: error: unknown type name 'uint' > const uint qh_after = ctx->head - qh_aligned; > ^~~~ > compress.c: In function 'z_erofs_convert_to_compacted_format': > compress.c:313:8: error: unknown type name 'uint' > const uint headerpos = Z_EROFS_VLE_EXTENT_ALIGN(inode->inode_isize + > ^~~~ > compress.c:316:8: error: unknown type name 'uint' > const uint totalidx = (legacymetasize - > ^~~~ > > [1] http://autobuild.buildroot.net/results/842a3c6416416d7badf4db9f38e3b231093a786a > Signed-off-by: Gao Xiang <hsiangkao@aol.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Thanks, ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-27 7:43 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20200324081949.26355-1-hsiangkao.ref@aol.com> 2020-03-24 8:19 ` [PATCH] erofs-utils: avoid using old compatibility type uint Gao Xiang via Linux-erofs 2020-03-26 16:19 ` Li GuiFu via Linux-erofs 2020-03-27 7:41 ` Chao Yu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).