Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2672112ybh; Fri, 24 Jul 2020 20:47:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyv8Ysmnm6t8riYQ01GuV9ihgUSnwl0ZvKiuB6iH7ZOnvFIOImkzY29/gcD83XfGL0yVv8 X-Received: by 2002:aa7:ca10:: with SMTP id y16mr4897400eds.345.1595648851514; Fri, 24 Jul 2020 20:47:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595648851; cv=none; d=google.com; s=arc-20160816; b=xTZdJaYvWB4KuU4GZ9P/NbFj3aDpy111GscU4fFtd7kkmjrHpoEdKJMoq9osN6paZF G+TJvC0Nq58XafQjLvll5DTeMaCY3S2R0mkDp9w1Ov5K8MH0fWOqtxv/+HZchX++eWAs odJyj/rkqxL/f/kLJY4wiQywUE6GDZ3INTN75hNaN79uNG29sGBfmGtQ8cdsWisSCx13 NMpeQWBHiSLVvQt/GDEbf18Mc0mohlA1xr+tXajq6vrNlQOyca3BEmf2ck+G25kYcsug Rf1gXhVk/Hgbaia3g5QY9uprInMUnQqavSbDd5ZumiX7sy8ARkUJjl3QZfb+oS/M47pk Yt3Q== 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=anGZ6YMDBEzd9yHwIWzxofXAOKwmxzLIW3BWQi97hJ21nvLre7XW/9MulvU9H2PiQ+ GcOXF2kPzvSxNx8ArTyXAuSS8zgmBs4KmwwDKfe7q6TZR4MLM11xgW0cn3LPAs8V4xJF w0PV3BWp9RFXaut22G/ZPzO7haQop6P7TnHnLS204RYEb3uDCtlZHj+8Ih/55Qf61h4b htNnCROj5uYH5KupHbSQc8s1oq3n/95qfoqqdveXbmF6ne1ZUZaveNNGnATdHxsTUjMM JcHwKz/h2I8/JWRGZmXABVzwFFio3U6sdzAK1U1xzWz1+XZjGvVYONJT8oYOWLonpNgI IUxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 gg21si1666273ejb.694.2020.07.24.20.47.08; Fri, 24 Jul 2020 20:47:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727026AbgGYDq5 (ORCPT + 99 others); Fri, 24 Jul 2020 23:46:57 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:8815 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726890AbgGYDqy (ORCPT ); Fri, 24 Jul 2020 23:46:54 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id D25121F6D6F8DA734F2A; Sat, 25 Jul 2020 11:46:49 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Sat, 25 Jul 2020 11:46:41 +0800 From: Yang Shen To: , CC: , , , Subject: [PATCH 07/10] crypto: hisilicon/zip - fix static check warning Date: Sat, 25 Jul 2020 11:44:40 +0800 Message-ID: <1595648683-50590-8-git-send-email-shenyang39@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1595648683-50590-1-git-send-email-shenyang39@huawei.com> References: <1595648683-50590-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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