diff options
author | Zhou Wang <wangzhou1@hisilicon.com> | 2019-10-26 04:57:21 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-11-01 06:42:47 +0100 |
commit | f0c8b6a1e1454f1645463e8ffb3e027fc597867c (patch) | |
tree | 7877744963b82a80c7b011d6539df2050ca8b6dd /drivers/crypto/hisilicon/sgl.c | |
parent | crypto: skcipher - rename the crypto_blkcipher module and kconfig option (diff) | |
download | linux-f0c8b6a1e1454f1645463e8ffb3e027fc597867c.tar.xz linux-f0c8b6a1e1454f1645463e8ffb3e027fc597867c.zip |
crypto: hisilicon - use sgl API to get sgl dma addr and len
Use sgl API to get sgl dma addr and len, this will help to avoid compile
error in some platforms. So NEED_SG_DMA_LENGTH can be removed here, which
can only be selected by arch code.
Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com>
Suggested-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/hisilicon/sgl.c')
-rw-r--r-- | drivers/crypto/hisilicon/sgl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index bf72603f16cb..012023c347b1 100644 --- a/drivers/crypto/hisilicon/sgl.c +++ b/drivers/crypto/hisilicon/sgl.c @@ -164,8 +164,8 @@ static struct hisi_acc_hw_sgl *acc_get_sgl(struct hisi_acc_sgl_pool *pool, static void sg_map_to_hw_sg(struct scatterlist *sgl, struct acc_hw_sge *hw_sge) { - hw_sge->buf = sgl->dma_address; - hw_sge->len = cpu_to_le32(sgl->dma_length); + hw_sge->buf = sg_dma_address(sgl); + hw_sge->len = cpu_to_le32(sg_dma_len(sgl)); } static void inc_hw_sgl_sge(struct hisi_acc_hw_sgl *hw_sgl) |