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

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

 



Hi Herbert,

On 27 November 2015 at 14:12, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
> Andrew Zaborowski <andrew.zaborowski@xxxxxxxxx> 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);
>> +
>> +       if (!akcipher->free) {
>> +               inst->tmpl->free(inst);
>> +               return;
>> +       }
>
> You don't need this bit.  AEAD has it because there were legacy
> templates but you are starting from a clean slate.

You're right there aren't any users that need this now but again is
there any reason you prefer the inst->free approach?

BTW note the lines that assign inst->free in crypto/gcm.c end with
commas which could lead to confusion.

Best regards
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux