Re: [PATCH 2/10] crypto: aead - Count error stats differently

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

 



On Wed, Feb 15, 2023 at 09:35:21PM -0800, Eric Biggers wrote:
> On Wed, Feb 15, 2023 at 05:25:09PM +0800, Herbert Xu wrote:
> >  int crypto_aead_encrypt(struct aead_request *req)
> >  {
> >  	struct crypto_aead *aead = crypto_aead_reqtfm(req);
> > -	struct crypto_alg *alg = aead->base.__crt_alg;
> > +	struct aead_alg *alg = crypto_aead_alg(aead);
> >  	unsigned int cryptlen = req->cryptlen;
> 
> The cryptlen local variable is no longer needed.  Just use req->cryptlen below.

Thanks, I'll remove it.

> This could just check whether istat is NULL:

Yes but that would introduce an unnecessary branch when STATS
are enabled.  I agree that it makes no difference if you don't
enable STATS though.

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



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