crypto: skcipher - Add skcipher_ialg_simple helper
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 20 Dec 2019 05:29:40 +0000 (13:29 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 27 Dec 2019 10:18:04 +0000 (18:18 +0800)
commitb3c16bfc6a79ae517ec3c44be615aed0ffa52c53
tree1a0405808ed63f31289bee2ba5927cda3496e908
parent93e23eb2ed6c11b4f483c8111ac155ec2b1f3042
crypto: skcipher - Add skcipher_ialg_simple helper

This patch introduces the skcipher_ialg_simple helper which fetches
the crypto_alg structure from a simple skcipher instance's spawn.

This allows us to remove the third argument from the function
skcipher_alloc_instance_simple.

In doing so the reference count to the algorithm is now maintained
by the Crypto API and the caller no longer needs to drop the alg
refcount.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/cbc.c
crypto/cfb.c
crypto/ctr.c
crypto/ecb.c
crypto/keywrap.c
crypto/ofb.c
crypto/pcbc.c
crypto/skcipher.c
include/crypto/internal/skcipher.h