[PATCH] crypto: Move akcipher_request_cast helper to crypto header

Herbert Xu herbert at gondor.apana.org.au
Thu Oct 5 15:09:12 AEDT 2023


On Sun, Oct 01, 2023 at 08:13:57PM +0000, Corentin Labbe wrote:
>
> diff --git a/include/crypto/akcipher.h b/include/crypto/akcipher.h
> index 670508f1dca1..4b6e610db18d 100644
> --- a/include/crypto/akcipher.h
> +++ b/include/crypto/akcipher.h
> @@ -498,4 +498,11 @@ static inline int crypto_akcipher_set_priv_key(struct crypto_akcipher *tfm,
>  
>  	return alg->set_priv_key(tfm, key, keylen);
>  }
> +
> +static inline struct akcipher_request *
> +	akcipher_request_cast(struct crypto_async_request *req)
> +{
> +	return container_of(req, struct akcipher_request, base);
> +}

Please move this to include/crypto/internal/akcipher.h.

Thanks,
-- 
Email: Herbert Xu <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


More information about the Linux-aspeed mailing list