* [PATCH] crypto: Move crypto_yield() to algapi.h
@ 2014-05-26 13:32 Marek Vasut
2014-06-20 18:40 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Marek Vasut @ 2014-05-26 13:32 UTC (permalink / raw)
To: linux-crypto; +Cc: herbert, Marek Vasut
It makes no sense for crypto_yield() to be defined in scatterwalk.h ,
move it into algapi.h as it's an internal function to crypto API.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
---
include/crypto/algapi.h | 6 ++++++
include/crypto/scatterwalk.h | 6 ------
2 files changed, 6 insertions(+), 6 deletions(-)
NOTE: I didn't manage to compile-test it, but logically it should work, since
scatterwalk.h includes algapi.h .
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index 016c2f1..623a59c 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -410,4 +410,10 @@ static inline int crypto_memneq(const void *a, const void *b, size_t size)
return __crypto_memneq(a, b, size) != 0UL ? 1 : 0;
}
+static inline void crypto_yield(u32 flags)
+{
+ if (flags & CRYPTO_TFM_REQ_MAY_SLEEP)
+ cond_resched();
+}
+
#endif /* _CRYPTO_ALGAPI_H */
diff --git a/include/crypto/scatterwalk.h b/include/crypto/scatterwalk.h
index 6a626a5..7ef512f 100644
--- a/include/crypto/scatterwalk.h
+++ b/include/crypto/scatterwalk.h
@@ -25,12 +25,6 @@
#include <linux/scatterlist.h>
#include <linux/sched.h>
-static inline void crypto_yield(u32 flags)
-{
- if (flags & CRYPTO_TFM_REQ_MAY_SLEEP)
- cond_resched();
-}
-
static inline void scatterwalk_sg_chain(struct scatterlist *sg1, int num,
struct scatterlist *sg2)
{
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: Move crypto_yield() to algapi.h
2014-05-26 13:32 [PATCH] crypto: Move crypto_yield() to algapi.h Marek Vasut
@ 2014-06-20 18:40 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2014-06-20 18:40 UTC (permalink / raw)
To: Marek Vasut; +Cc: linux-crypto
On Mon, May 26, 2014 at 03:32:05PM +0200, Marek Vasut wrote:
> It makes no sense for crypto_yield() to be defined in scatterwalk.h ,
> move it into algapi.h as it's an internal function to crypto API.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
Patch applied.
--
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:[~2014-06-20 18:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-26 13:32 [PATCH] crypto: Move crypto_yield() to algapi.h Marek Vasut
2014-06-20 18:40 ` 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).