Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1867580pxa; Sun, 23 Aug 2020 20:17:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxq4+gCbygO7KGkOCDrymPH1cJJX92ljgvgy/QnCRx2B1iGlF4mvkrTeEb8bigHAVQFHz33 X-Received: by 2002:a17:906:eb90:: with SMTP id mh16mr3591155ejb.10.1598239055933; Sun, 23 Aug 2020 20:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598239055; cv=none; d=google.com; s=arc-20160816; b=cy5xObm2+eOKQe1D1kJut4xiwRTCJvFsth2n3COuKkLaXjzbiyr3KEKIRFVLx5wIew fg0hHMm5uVQW18yDe66rGvQzy+zUUnR37T1mTIaQ/xaXkomNf4uOi68lXHkgqM+1ieVY 3PQ175Q5dSpGs+PgX4HJiN07xRvRtnoGlwHfJvT4jIhl1KKN04IOpbj632nf3WT2UrFX zIvxzGXM+Q72nvIVDO8X4t3eoygJUVQrKP05mCV/j0nT+6s6rKMOfZJZAiKzM1a3ouLo JyDhp8NofZziKH6eEtJDIDVDzdCcLfTx405bkvM+qDWBJzQYb1zrXijrkrC1N0Jr5gWi y3kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=jV3C8vBieDkXwTRU2DsnufTpurO7oJDNJbfSOBC/cZw=; b=URetNC4jcmNnjfrTlQdUV48HvpLqk3R7TSyIpHmbklQaCfzRlqYZ161BfjboC3QX4R cttSxoWsYXlb5Q4qKcu1s51sGleBmdE65OwbT3n0DEf8o9mk8IuOSlqqQJv2ESkSIPAL 3P/vPWd5+FSl0lhKscoi94jQ02MNtoAeS9B+ewZuc5ROD4+rGikI4MQMdy8eSPjINgfh QNzghm+YGqdzv3vwGQ9q+BlrBcztfR4PjP5pcSsg68JSztUaHIW/XujXCi10HfrX6dge 5WSw17nmojT+CYSESiDHCYS0A83KGjTFASIx/fjPyztr8N0IVfx8gUEeACQpEPaN6a9t syWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i22si6098808edr.232.2020.08.23.20.17.12; Sun, 23 Aug 2020 20:17:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728213AbgHXDOw (ORCPT + 99 others); Sun, 23 Aug 2020 23:14:52 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:43290 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728110AbgHXDOc (ORCPT ); Sun, 23 Aug 2020 23:14:32 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id B998592DBF462D99C2E5; Mon, 24 Aug 2020 11:14:24 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Mon, 24 Aug 2020 11:14:15 +0800 From: Yang Shen To: , CC: , , , Subject: [PATCH RESEND 07/10] crypto: hisilicon/zip - fix static check warning Date: Mon, 24 Aug 2020 11:11:46 +0800 Message-ID: <1598238709-58699-8-git-send-email-shenyang39@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1598238709-58699-1-git-send-email-shenyang39@huawei.com> References: <1598238709-58699-1-git-send-email-shenyang39@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Fix some code for PClint warning: Warning - Suspicious Cast Signed-off-by: Yang Shen Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_crypto.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/hisilicon/zip/zip_crypto.c b/drivers/crypto/hisilicon/zip/zip_crypto.c index 7aa8a55..fdc5bd3 100644 --- a/drivers/crypto/hisilicon/zip/zip_crypto.c +++ b/drivers/crypto/hisilicon/zip/zip_crypto.c @@ -16,7 +16,7 @@ #define GZIP_HEAD_FLG_SHIFT 3 #define GZIP_HEAD_FEXTRA_SHIFT 10 -#define GZIP_HEAD_FEXTRA_XLEN 2 +#define GZIP_HEAD_FEXTRA_XLEN 2UL #define GZIP_HEAD_FHCRC_SIZE 2 #define HZIP_GZIP_HEAD_BUF 256 @@ -51,13 +51,13 @@ enum { struct hisi_zip_req { struct acomp_req *req; - int sskip; - int dskip; + u32 sskip; + u32 dskip; struct hisi_acc_hw_sgl *hw_src; struct hisi_acc_hw_sgl *hw_dst; dma_addr_t dma_src; dma_addr_t dma_dst; - int req_id; + u16 req_id; }; struct hisi_zip_req_q { @@ -119,7 +119,7 @@ static void hisi_zip_config_tag(struct hisi_zip_sqe *sqe, u32 tag) static void hisi_zip_fill_sqe(struct hisi_zip_sqe *sqe, u8 req_type, dma_addr_t s_addr, dma_addr_t d_addr, u32 slen, - u32 dlen, int sskip, int dskip) + u32 dlen, u32 sskip, u32 dskip) { memset(sqe, 0, sizeof(struct hisi_zip_sqe)); @@ -573,7 +573,7 @@ static int hisi_zip_acompress(struct acomp_req *acomp_req) return head_size; } - req = hisi_zip_create_req(acomp_req, qp_ctx, (size_t)head_size, true); + req = hisi_zip_create_req(acomp_req, qp_ctx, head_size, true); if (IS_ERR(req)) { dev_err_ratelimited(dev, "Create request before compress failed (%ld)!\n", PTR_ERR(req)); -- 2.7.4