]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: xilinx - Remove un-necessary typecast operation
authorHarsh Jain <h.jain@amd.com>
Sat, 20 Dec 2025 15:59:04 +0000 (21:29 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 23 Jan 2026 05:48:43 +0000 (13:48 +0800)
Return type of crypto_tfm_ctx() is void *. Remove explicit type cast.

Signed-off-by: Harsh Jain <h.jain@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/xilinx/zynqmp-aes-gcm.c

index c2563c6837e41fdb3f39f4e1ca3617062248b97b..80b0ace7b5caa0adb6edf3cc25baf3548dd4cf76 100644 (file)
@@ -282,8 +282,7 @@ static int xilinx_aes_aead_setauthsize(struct crypto_aead *aead,
                                       unsigned int authsize)
 {
        struct crypto_tfm *tfm = crypto_aead_tfm(aead);
-       struct xilinx_aead_tfm_ctx *tfm_ctx =
-                       (struct xilinx_aead_tfm_ctx *)crypto_tfm_ctx(tfm);
+       struct xilinx_aead_tfm_ctx *tfm_ctx = crypto_tfm_ctx(tfm);
 
        tfm_ctx->authsize = authsize;
        return tfm_ctx->fbk_cipher ? crypto_aead_setauthsize(tfm_ctx->fbk_cipher, authsize) : 0;
@@ -372,8 +371,7 @@ static int xilinx_paes_aead_init(struct crypto_aead *aead)
 static int xilinx_aes_aead_init(struct crypto_aead *aead)
 {
        struct crypto_tfm *tfm = crypto_aead_tfm(aead);
-       struct xilinx_aead_tfm_ctx *tfm_ctx =
-               (struct xilinx_aead_tfm_ctx *)crypto_tfm_ctx(tfm);
+       struct xilinx_aead_tfm_ctx *tfm_ctx = crypto_tfm_ctx(tfm);
        struct xilinx_aead_alg *drv_ctx;
        struct aead_alg *alg = crypto_aead_alg(aead);
 
@@ -422,8 +420,7 @@ static void xilinx_paes_aead_exit(struct crypto_aead *aead)
 static void xilinx_aes_aead_exit(struct crypto_aead *aead)
 {
        struct crypto_tfm *tfm = crypto_aead_tfm(aead);
-       struct xilinx_aead_tfm_ctx *tfm_ctx =
-                       (struct xilinx_aead_tfm_ctx *)crypto_tfm_ctx(tfm);
+       struct xilinx_aead_tfm_ctx *tfm_ctx = crypto_tfm_ctx(tfm);
 
        dma_unmap_single(tfm_ctx->dev, tfm_ctx->key_dma_addr, AES_KEYSIZE_256, DMA_TO_DEVICE);
        kfree(tfm_ctx->key);