summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-06-30 15:16:16 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2018-07-09 00:30:29 +0800
commit85d7311f1908b9ca20c10c2c23f5dbb93875f0c6 (patch)
treebe536c8dbc57acdda5694565af7ca023a17685f8 /Documentation
parent2c95e6d97892235b5b98cd4805e47fac87c2226f (diff)
downloadlinux-rpi-85d7311f1908b9ca20c10c2c23f5dbb93875f0c6.tar.gz
linux-rpi-85d7311f1908b9ca20c10c2c23f5dbb93875f0c6.tar.bz2
linux-rpi-85d7311f1908b9ca20c10c2c23f5dbb93875f0c6.zip
crypto: remove redundant type flags from tfm allocation
Some crypto API users allocating a tfm with crypto_alloc_$FOO() are also specifying the type flags for $FOO, e.g. crypto_alloc_shash() with CRYPTO_ALG_TYPE_SHASH. But, that's redundant since the crypto API will override any specified type flag/mask with the correct ones. So, remove the unneeded flags. This patch shouldn't change any actual behavior. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/crypto/api-samples.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/crypto/api-samples.rst b/Documentation/crypto/api-samples.rst
index 006827e30d06..0f6ca8b7261e 100644
--- a/Documentation/crypto/api-samples.rst
+++ b/Documentation/crypto/api-samples.rst
@@ -162,7 +162,7 @@ Code Example For Use of Operational State Memory With SHASH
char *hash_alg_name = "sha1-padlock-nano";
int ret;
- alg = crypto_alloc_shash(hash_alg_name, CRYPTO_ALG_TYPE_SHASH, 0);
+ alg = crypto_alloc_shash(hash_alg_name, 0, 0);
if (IS_ERR(alg)) {
pr_info("can't alloc alg %s\n", hash_alg_name);
return PTR_ERR(alg);