]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: rng - fix documentation for crypto_rng_alg()
authorOvidiu Panait <ovidiu.panait.oss@gmail.com>
Wed, 30 Apr 2025 11:59:53 +0000 (14:59 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 5 May 2025 10:20:45 +0000 (18:20 +0800)
Current documentation states that crypto_rng_alg() returns the cra_name of
the rng algorithm, but it actually returns a 'struct rng_alg' pointer from
a RNG handle.

Update documentation to reflect this.

Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/crypto/rng.h

index 5ac4388f50e13715a68f78e70a2398a3200920f8..f8224cc390f8dc2a3e729c31c5660c7edbb60320 100644 (file)
@@ -102,12 +102,10 @@ static inline struct rng_alg *__crypto_rng_alg(struct crypto_alg *alg)
 }
 
 /**
- * crypto_rng_alg - obtain name of RNG
- * @tfm: cipher handle
- *
- * Return the generic name (cra_name) of the initialized random number generator
+ * crypto_rng_alg() - obtain 'struct rng_alg' pointer from RNG handle
+ * @tfm: RNG handle
  *
- * Return: generic name string
+ * Return: Pointer to 'struct rng_alg', derived from @tfm RNG handle
  */
 static inline struct rng_alg *crypto_rng_alg(struct crypto_rng *tfm)
 {