Re: [PATCH v5 3/4] crypto: akcipher: add akcipher declarations needed by templates.

2015-11-27 Thread Herbert Xu
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

Re: [PATCH v5 3/4] crypto: akcipher: add akcipher declarations needed by templates.

2015-11-27 Thread Andrzej Zaborowski
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) >> +{ >> +

Re: [PATCH v5 3/4] crypto: akcipher: add akcipher declarations needed by templates.

2015-11-27 Thread Herbert Xu
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); > + > +

[PATCH v5 3/4] crypto: akcipher: add akcipher declarations needed by templates.

2015-11-26 Thread Andrew Zaborowski
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