linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: rng - move __crypto_rng_cast to the rng header
@ 2017-05-09  8:32 Corentin Labbe
  2017-06-10  4:14 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Corentin Labbe @ 2017-05-09  8:32 UTC (permalink / raw)
  To: nhorman, herbert, davem; +Cc: linux-crypto, linux-kernel, Corentin Labbe

This patch move __crypto_rng_cast() to the right header like other
__algo_cast functions.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 crypto/rng.c         | 5 -----
 include/crypto/rng.h | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/crypto/rng.c b/crypto/rng.c
index f46dac5..5e84692 100644
--- a/crypto/rng.c
+++ b/crypto/rng.c
@@ -33,11 +33,6 @@ struct crypto_rng *crypto_default_rng;
 EXPORT_SYMBOL_GPL(crypto_default_rng);
 static int crypto_default_rng_refcnt;
 
-static inline struct crypto_rng *__crypto_rng_cast(struct crypto_tfm *tfm)
-{
-	return container_of(tfm, struct crypto_rng, base);
-}
-
 int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen)
 {
 	u8 *buf = NULL;
diff --git a/include/crypto/rng.h b/include/crypto/rng.h
index b95ede3..4281193 100644
--- a/include/crypto/rng.h
+++ b/include/crypto/rng.h
@@ -197,4 +197,9 @@ static inline int crypto_rng_seedsize(struct crypto_rng *tfm)
 	return crypto_rng_alg(tfm)->seedsize;
 }
 
+static inline struct crypto_rng *__crypto_rng_cast(struct crypto_tfm *tfm)
+{
+	return container_of(tfm, struct crypto_rng, base);
+}
+
 #endif
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] crypto: rng - move __crypto_rng_cast to the rng header
  2017-05-09  8:32 [PATCH] crypto: rng - move __crypto_rng_cast to the rng header Corentin Labbe
@ 2017-06-10  4:14 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2017-06-10  4:14 UTC (permalink / raw)
  To: Corentin Labbe; +Cc: nhorman, davem, linux-crypto, linux-kernel

On Tue, May 09, 2017 at 10:32:22AM +0200, Corentin Labbe wrote:
> This patch move __crypto_rng_cast() to the right header like other
> __algo_cast functions.
> 
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>

As there is another patch which will remove thie function altogether,
I think I'll just leave it in place.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-10  4:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-09  8:32 [PATCH] crypto: rng - move __crypto_rng_cast to the rng header Corentin Labbe
2017-06-10  4:14 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).