mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 15:40:56 +07:00
crypto: hisilicon/hpre - adjust some coding style
Adjust some coding style to make code aligned. Signed-off-by: Meng Yu <yumeng18@huawei.com> Reviewed-by: Zaibo Xu <xuzaibo@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
7747cffe06
commit
937e871762
@ -188,8 +188,7 @@ static int hpre_get_data_dma_addr(struct hpre_asym_request *hpre_req,
|
|||||||
hpre_req->dst = NULL;
|
hpre_req->dst = NULL;
|
||||||
dma_dir = DMA_FROM_DEVICE;
|
dma_dir = DMA_FROM_DEVICE;
|
||||||
}
|
}
|
||||||
*tmp = dma_map_single(dev, sg_virt(data),
|
*tmp = dma_map_single(dev, sg_virt(data), len, dma_dir);
|
||||||
len, dma_dir);
|
|
||||||
if (unlikely(dma_mapping_error(dev, *tmp))) {
|
if (unlikely(dma_mapping_error(dev, *tmp))) {
|
||||||
dev_err(dev, "dma map data err!\n");
|
dev_err(dev, "dma map data err!\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@ -239,8 +238,8 @@ static int hpre_hw_data_init(struct hpre_asym_request *hpre_req,
|
|||||||
((is_dh && !is_src) || !is_dh))
|
((is_dh && !is_src) || !is_dh))
|
||||||
ret = hpre_get_data_dma_addr(hpre_req, data, len, is_src, &tmp);
|
ret = hpre_get_data_dma_addr(hpre_req, data, len, is_src, &tmp);
|
||||||
else
|
else
|
||||||
ret = hpre_prepare_dma_buf(hpre_req, data, len,
|
ret = hpre_prepare_dma_buf(hpre_req, data, len, is_src, &tmp);
|
||||||
is_src, &tmp);
|
|
||||||
if (unlikely(ret))
|
if (unlikely(ret))
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@ -267,11 +266,9 @@ static void hpre_hw_data_clr_all(struct hpre_ctx *ctx,
|
|||||||
|
|
||||||
if (src) {
|
if (src) {
|
||||||
if (req->src)
|
if (req->src)
|
||||||
dma_free_coherent(dev, ctx->key_sz,
|
dma_free_coherent(dev, ctx->key_sz, req->src, tmp);
|
||||||
req->src, tmp);
|
|
||||||
else
|
else
|
||||||
dma_unmap_single(dev, tmp,
|
dma_unmap_single(dev, tmp, ctx->key_sz, DMA_TO_DEVICE);
|
||||||
ctx->key_sz, DMA_TO_DEVICE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = le64_to_cpu(sqe->out);
|
tmp = le64_to_cpu(sqe->out);
|
||||||
|
Loading…
Reference in New Issue
Block a user