[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210409074349.GB23352@gondor.apana.org.au>
Date: Fri, 9 Apr 2021 17:43:49 +1000
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Kai Ye <yekai13@...wei.com>
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
wangzhou1@...ilicon.com
Subject: Re: [PATCH v2 5/5] crypto: hisilicon/sgl - fix the sg buf unmap
On Tue, Mar 30, 2021 at 03:39:06PM +0800, Kai Ye wrote:
> Add clear data operation for sge data.
>
> Signed-off-by: Kai Ye <yekai13@...wei.com>
> ---
> drivers/crypto/hisilicon/sgl.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c
> index c618aaf..7a58ab3 100644
> --- a/drivers/crypto/hisilicon/sgl.c
> +++ b/drivers/crypto/hisilicon/sgl.c
> @@ -189,6 +189,18 @@ static void update_hw_sgl_sum_sge(struct hisi_acc_hw_sgl *hw_sgl, u16 sum)
> hw_sgl->entry_sum_in_chain = cpu_to_le16(sum);
> }
>
> +static void clear_hw_sgl_sge(struct hisi_acc_hw_sgl *hw_sgl)
> +{
> + struct acc_hw_sge *hw_sge = hw_sgl->sge_entries;
> + int i;
> +
> + for (i = 0; i < hw_sgl->entry_sum_in_sgl; i++) {
> + hw_sge[i].page_ctrl = NULL;
> + hw_sge[i].buf = 0;
> + hw_sge[i].len = 0;
> + }
> +}
This causes a new sparse warning:
CHECK ../drivers/crypto/hisilicon/sgl.c
../drivers/crypto/hisilicon/sgl.c:200:31: warning: restricted __le16 degrades to integer
Please fix.
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists