From: Baolin Wang Date: Tue, 26 Jan 2016 12:25:38 +0000 (+0800) Subject: crypto: api - Introduce crypto_queue_len() helper function X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9f93a8a0ba91fa3babe76a428e6c24f4c39f125e;p=linux-beck.git crypto: api - Introduce crypto_queue_len() helper function This patch introduces crypto_queue_len() helper function to help to get the queue length in the crypto queue list now. Signed-off-by: Baolin Wang Signed-off-by: Herbert Xu --- diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index c9fe145f7dd3..4f861c44d066 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h @@ -184,6 +184,10 @@ int crypto_enqueue_request(struct crypto_queue *queue, struct crypto_async_request *request); struct crypto_async_request *crypto_dequeue_request(struct crypto_queue *queue); int crypto_tfm_in_queue(struct crypto_queue *queue, struct crypto_tfm *tfm); +static inline unsigned int crypto_queue_len(struct crypto_queue *queue) +{ + return queue->qlen; +} /* These functions require the input/output to be aligned as u32. */ void crypto_inc(u8 *a, unsigned int size);