On Fri, Nov 27, 2015 at 04:10:41PM +0100, Andrzej Zaborowski wrote:
>
> You're right there aren't any users that need this now but again is
> there any reason you prefer the inst->free approach?
Because this method is type-safe while the old way is not.
> BTW note the lines that assign inst->free
Hi Herbert,
On 27 November 2015 at 14:12, Herbert Xu wrote:
> Andrew Zaborowski wrote:
>>
>> @@ -75,9 +76,22 @@ static int crypto_akcipher_init_tfm(struct crypto_tfm
>> *tfm)
>>return 0;
>> }
>>
>> +static void crypto_akcipher_free_instance(struct crypto_instance *inst)
>> +{
>> +
Andrew Zaborowski wrote:
>
> @@ -75,9 +76,22 @@ static int crypto_akcipher_init_tfm(struct crypto_tfm *tfm)
>return 0;
> }
>
> +static void crypto_akcipher_free_instance(struct crypto_instance *inst)
> +{
> + struct akcipher_instance *akcipher = akcipher_instance(inst);
> +
> +
Add a struct akcipher_instance and struct akcipher_spawn similar to
how AEAD declares them and the macros for converting to/from
crypto_instance/crypto_spawn. Also add register functions to
avoid exposing crypto_akcipher_type.
Signed-off-by: Andrew Zaborowski
---
v2: no changes since v1
v3: drop