crypto: Move crypto_yield() to algapi.h
PATCH 1/1 crypto: Move crypto_yield() to algapi.h
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 <[email protected]>
Cc Herbert Xu <[email protected]>
--- 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 .
include/crypto/algapi.h +6 -0
@@ -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 */
include/crypto/scatterwalk.h +0 -6
@@ -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) {
Signature · 1 line
2.0.0.rc0
Herbert Xu
maintainerQuoted 5 lines · Marek Vasut
It makes no sense for
crypto_yield()to be defined inscatterwalk.h, move it intoalgapi.has it's an internal function to crypto API.Signed-off-by Marek Vasut <[email protected]>Cc Herbert Xu <[email protected]>
Patch applied.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt