From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68845C4332B for ; Tue, 24 Mar 2020 08:20:29 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16338207FF for ; Tue, 24 Mar 2020 08:20:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.ozlabs.org header.i=@lists.ozlabs.org header.b="HKWW6E15"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=aol.com header.i=@aol.com header.b="KfpHGsNy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16338207FF Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=lists.ozlabs.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48mkhW3gtxzDqw1 for ; Tue, 24 Mar 2020 19:20:27 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.ozlabs.org; s=201707; t=1585038027; bh=wspaI/WqCh0xN/xb14ALdS7Ow0Y6iycP0EGsDMDwkO8=; h=To:Subject:Date:References:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=HKWW6E15LclEtz1N1wk9v74gtpRepffSNVW1YjHMrTF5j3+iTcV4GScGQPO0BJdpb A8dF7Xv3+dvCB4WtwPAeywKOwJqbLz29HRz8O2vNgaiS0PvyxD0p3GiMO9TsNHY6VN o7bc8S/xLAdjaGwObYPF+sVepBd9Yzw/yZj/CIbn5P6zEoUbkhzH4qZO4EH2dwaoLG CMFCPM76MDuE1jDLLNh3YvdxZH/rWGs+5I04eBUIYGD1Yz8ca7YYS5LPOB+Vhx8CbE ZCKVPrsip6axQ7sqzDHmX5CZC5t8sWIXpdQ/MeRTZYo69Hlhf+Yli6/ARMtesVCOlp MKFpWREfeyBvQ== Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=aol.com (client-ip=66.163.186.204; helo=sonic310-23.consmr.mail.ne1.yahoo.com; envelope-from=hsiangkao@aol.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=aol.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aol.com header.i=@aol.com header.a=rsa-sha256 header.s=a2048 header.b=KfpHGsNy; dkim-atps=neutral Received: from sonic310-23.consmr.mail.ne1.yahoo.com (sonic310-23.consmr.mail.ne1.yahoo.com [66.163.186.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48mkhK44xFzDqs3 for ; Tue, 24 Mar 2020 19:20:14 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1585038010; bh=bwRFpDkboiemWvBPQMBpFEPz8a5WGylEmulfIHlbggQ=; h=From:To:Cc:Subject:Date:References:From:Subject; b=KfpHGsNyGdMVv/RQcGe30ZeQ3VbCDh9BDJtnwp0GGnb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JKxO4Nf.fZ5wtYNvyp7ibZg6FCAP_NiEaFYc_5hUf7LEZmziYCJCOJYm4zz AQl8UC9zbR9Ii9miNhN4_Eh.M7qMqszZjqDtsTr.BaPEU6kITGHjv3uhNOALub67tE7xROU83UOK VOS0akfGhaH7bawSB7ANKEqxiMXrolF62WRcPyl0sFlTOs5sXVyZTHWE8GST69t6zElnIXKymbT3 PIWfbLDc07WrSEReailJngNkCAcRjiTo.uyucJsOWSYOi.3iaIsdK.buNYbnjkhFHCfLGFGE4CjN 7lNL7vHNqouDHCUqdfv4HppaXPgl_roexuiu8q1oyHoqVmzFlsRYgHoBNN0v9AmEyH4Cto1JE4vh Kk7YIoKOE3NeMwgHtJ6pdxfo_niBaQOqi82_7hWo6gf4E6MnbS2EyalQ4RfqJ.kohiCbRVijeP7S djh_Kr3.q_cL0oPS87DvsmB6hSJGOCoV0f1ff.nOyjUPBS620deNcQaDIuszkjBL1CZ7piBqIrKF znuvzb2RFCTLXiVnb.il14B2PfX04d0WFC55lZmHUaO35F7pPepiUNlyYNvpXXar0JiDZtnfGMVx CVrkes1nfMgj8RWRLu8UHalMT4i72jJ3Pbs_jHJcSYDahztRrCeJ67wgfAwsEMe3Z8QggybyYZfh VCtgsWv5J9rs_49msIdkj0N3hoT3UxTSB_ioy Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Tue, 24 Mar 2020 08:20:10 +0000 Received: by smtp409.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 0cf8867b50cd90ab07bcd9ca49924ad3; Tue, 24 Mar 2020 08:20:05 +0000 (UTC) To: linux-erofs@lists.ozlabs.org, Li Guifu , Li GuiFu Subject: [PATCH] erofs-utils: avoid using old compatibility type uint Date: Tue, 24 Mar 2020 16:19:49 +0800 Message-Id: <20200324081949.26355-1-hsiangkao@aol.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit References: <20200324081949.26355-1-hsiangkao.ref@aol.com> X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Gao Xiang via Linux-erofs Reply-To: Gao Xiang Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" 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 --- 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