Re: [PATCH 14/29] crypto: talitos/aead - Convert to init/exit type-specific API

From: Paul Louvel

Date: Thu Jun 04 2026 - 08:52:50 EST


On Mon Jun 1, 2026 at 1:59 PM CEST, Christophe Leroy (CS GROUP) wrote:
>
>
> Le 28/05/2026 à 11:08, Paul Louvel a écrit :
>> Since commit 6eed1e3552fc0 ("crypto: api - Mark cra_init/cra_exit as
>> deprecated"), both cra_{init,exit} are deprecated.
>>
>> Restore the type-specific talitos_cra_exit_aead() wrapper and use
>> aead_alg->exit instead of the generic cra_exit field, matching the
>> pattern used by init.
>
> When you say "restore", do you mean it was removed at some point in the
> past ?

No. It was probably true at some point of my the series locally (I did a lot of
rebase), I forgot to update the commit message of this patch.

Thanks for pointing this out.

>>
>> Signed-off-by: Paul Louvel <paul.louvel@xxxxxxxxxxx>
>
> Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@xxxxxxxxxx>
>
>> ---
>> drivers/crypto/talitos/talitos-aead.c | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/crypto/talitos/talitos-aead.c b/drivers/crypto/talitos/talitos-aead.c
>> index c09ed08be2ef..38df616c9b22 100644
>> --- a/drivers/crypto/talitos/talitos-aead.c
>> +++ b/drivers/crypto/talitos/talitos-aead.c
>> @@ -400,6 +400,11 @@ static int talitos_cra_init_aead(struct crypto_aead *tfm)
>> return talitos_init_common(ctx, talitos_alg);
>> }
>>
>> +static void talitos_cra_exit_aead(struct crypto_aead *tfm)
>> +{
>> + talitos_cra_exit(crypto_aead_tfm(tfm));
>> +}
>> +
>> static struct talitos_alg_template aead_driver_algs[] = {
>> { .type = CRYPTO_ALG_TYPE_AEAD,
>> .alg.aead = {
>> @@ -950,8 +955,8 @@ int talitos_register_aead(struct device *dev)
>> if (has_ftr_sec1(priv))
>> alg->cra_alignmask = 3;
>>
>> - alg->cra_exit = talitos_cra_exit;
>> aead_alg->init = talitos_cra_init_aead;
>> + aead_alg->exit = talitos_cra_exit_aead;
>> aead_alg->setkey = aead_alg->setkey ?: aead_setkey;
>> aead_alg->encrypt = aead_encrypt;
>> aead_alg->decrypt = aead_decrypt;
>>




--
Paul Louvel, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com