Commit d30a3969 authored by Gilad Ben-Yossef's avatar Gilad Ben-Yossef Committed by Greg Kroah-Hartman
Browse files

staging: ccree: simplify AEAD using local var



Make the code more readable by using a local variable
for commonly use expression in the AEAD part of the driver.

Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e1cb54fd
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -251,13 +251,11 @@ static void ssi_aead_complete(struct device *dev, void *ssi_req, void __iomem *c
		}
	} else { /*ENCRYPT*/
		if (unlikely(areq_ctx->is_icv_fragmented)) {
			u32 skip = areq->cryptlen + areq_ctx->dst_offset;

			cc_copy_sg_portion(dev, areq_ctx->mac_buf,
					   areq_ctx->dst_sgl,
					   (areq->cryptlen +
					    areq_ctx->dst_offset),
					   (areq->cryptlen +
					    areq_ctx->dst_offset +
					    ctx->authsize),
					   areq_ctx->dst_sgl, skip,
					   (skip + ctx->authsize),
					   SSI_SG_FROM_BUF);
		}