Skip to content

Commit eb175f7

Browse files
Yang Shenherbertx
authored andcommitted
crypto: hisilicon/zip - fix static check warning
Fix some code for PClint warning: Warning - Suspicious Cast Signed-off-by: Yang Shen <shenyang39@huawei.com> Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent b1a2582 commit eb175f7

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎drivers/crypto/hisilicon/zip/zip_crypto.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#define GZIP_HEAD_FLG_SHIFT 3
1818
#define GZIP_HEAD_FEXTRA_SHIFT 10
19-
#define GZIP_HEAD_FEXTRA_XLEN 2
19+
#define GZIP_HEAD_FEXTRA_XLEN 2UL
2020
#define GZIP_HEAD_FHCRC_SIZE 2
2121

2222
#define HZIP_GZIP_HEAD_BUF 256
@@ -51,13 +51,13 @@ enum {
5151

5252
struct hisi_zip_req {
5353
struct acomp_req *req;
54-
int sskip;
55-
int dskip;
54+
u32 sskip;
55+
u32 dskip;
5656
struct hisi_acc_hw_sgl *hw_src;
5757
struct hisi_acc_hw_sgl *hw_dst;
5858
dma_addr_t dma_src;
5959
dma_addr_t dma_dst;
60-
int req_id;
60+
u16 req_id;
6161
};
6262

6363
struct hisi_zip_req_q {
@@ -119,7 +119,7 @@ static void hisi_zip_config_tag(struct hisi_zip_sqe *sqe, u32 tag)
119119

120120
static void hisi_zip_fill_sqe(struct hisi_zip_sqe *sqe, u8 req_type,
121121
dma_addr_t s_addr, dma_addr_t d_addr, u32 slen,
122-
u32 dlen, int sskip, int dskip)
122+
u32 dlen, u32 sskip, u32 dskip)
123123
{
124124
memset(sqe, 0, sizeof(struct hisi_zip_sqe));
125125

@@ -573,7 +573,7 @@ static int hisi_zip_acompress(struct acomp_req *acomp_req)
573573
return head_size;
574574
}
575575

576-
req = hisi_zip_create_req(acomp_req, qp_ctx, (size_t)head_size, true);
576+
req = hisi_zip_create_req(acomp_req, qp_ctx, head_size, true);
577577
if (IS_ERR(req))
578578
return PTR_ERR(req);
579579

0 commit comments

Comments
 (0)