From cadbbe3f1f6de1eb79b6c8544061ade37bbe847c Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Tue, 7 Mar 2023 15:26:06 +0000 Subject: [PATCH] nvvse: cryptodev: Fix build for Linux v6.3 Commit 255e48eb1768 ("crypto: api - Use data directly in completion function") updates the typedef crypto_completion_t such that a pointer to the data is directly passed to the completion function instead of a structure of type crypto_async_request. This breaks building the Tegra NVVSE Cryptodev driver for Linux v6.3 and so update the driver accordingly to fix the build. Bug 4014315 Change-Id: I6e9ed50f5c226548efa5f52d094243f466ad399d Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2867127 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/crypto/tegra-nvvse-cryptodev.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/crypto/tegra-nvvse-cryptodev.c b/drivers/crypto/tegra-nvvse-cryptodev.c index b52f3f07..6e4d1215 100644 --- a/drivers/crypto/tegra-nvvse-cryptodev.c +++ b/drivers/crypto/tegra-nvvse-cryptodev.c @@ -134,9 +134,15 @@ struct tnvvse_cmac_req_data { uint8_t result; }; +#if (KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE) +static void tnvvse_crypto_complete(void *data, int err) +{ + struct tnvvse_crypto_completion *done = data; +#else static void tnvvse_crypto_complete(struct crypto_async_request *req, int err) { struct tnvvse_crypto_completion *done = req->data; +#endif if (err != -EINPROGRESS) { done->req_err = err;