Re: [PATCH 01/12] crypto: add helper function for akcipher_request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/22/2019 11:08 AM, Herbert Xu wrote:
> On Mon, Nov 18, 2019 at 12:30:34AM +0200, Iuliana Prodan wrote:
>>
>> diff --git a/include/crypto/akcipher.h b/include/crypto/akcipher.h
>> index 6924b09..4365edd 100644
>> --- a/include/crypto/akcipher.h
>> +++ b/include/crypto/akcipher.h
>> @@ -170,6 +170,12 @@ static inline struct crypto_akcipher *crypto_akcipher_reqtfm(
>>   	return __crypto_akcipher_tfm(req->base.tfm);
>>   }
>>   
>> +static inline struct akcipher_request *akcipher_request_cast(
>> +	struct crypto_async_request *req)
>> +{
>> +	return container_of(req, struct akcipher_request, base);
>> +}
> 
> This should go into include/crypto/internal/akcipher.h as it's
> only used by implementors.
> 
> But having reviewed the subsequent patches I think we shouldn't
> have this function at all.
> 

Why can't we use this? There are similar functions for 
skcipher/aead/ahash and they are all in include/crypto.

Thanks,
Iulia




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux