Skip to content

Commit

Permalink
crypto: api - Move crypto_yield() to algapi.h
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Marek Vasut authored and herbertx committed Jun 20, 2014
1 parent 7171511 commit bb55a4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions include/crypto/algapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
6 changes: 0 additions & 6 deletions include/crypto/scatterwalk.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit bb55a4c

Please sign in to comment.