From patchwork Tue Jan 26 12:25:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 60450 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1925464lbb; Tue, 26 Jan 2016 04:27:19 -0800 (PST) X-Received: by 10.98.14.68 with SMTP id w65mr33801085pfi.146.1453811239378; Tue, 26 Jan 2016 04:27:19 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s137si1817723pfs.11.2016.01.26.04.27.19 for ; Tue, 26 Jan 2016 04:27:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934074AbcAZM1S (ORCPT ); Tue, 26 Jan 2016 07:27:18 -0500 Received: from mail-pf0-f177.google.com ([209.85.192.177]:36334 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933947AbcAZM0c (ORCPT ); Tue, 26 Jan 2016 07:26:32 -0500 Received: by mail-pf0-f177.google.com with SMTP id n128so98445552pfn.3 for ; Tue, 26 Jan 2016 04:26:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=jpz5hgbkvWVWNorgAVbDXeBFHmPJJLt1N36FHND9Ry8=; b=H4CFAs1QPGIHRK3HKgQKRhNuf2hXB5Q7OMcyodxIuFbYTahN9cx4nSgl39H2urD7ZR kTc6N24cfD9L9ml6AJiIXcCKU/tyAc81eGDW97r5k75B1gsnsjVh1Z5BSyA0O07EWfZD rUeXayFUuZHhyShc6fnOrYSGdp3SIlO51TnPg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=jpz5hgbkvWVWNorgAVbDXeBFHmPJJLt1N36FHND9Ry8=; b=K9adBJxy+Vgi05QLncBkjR4gNXEKfGZsSZTxylbJxB6NIg6CWd7IY90ZETOJM9JxyV URApWE3FIoLnxPTuGvu9rIV6BkIzdUzIe75Oc9NaD9RTW3gk2U8u/LW1c0b8GNbfpUwy WNKFAy7DbK2F7K6cipNOtM8m4pLo+s3UESup+2Nr0i1/ZgJHp7k+q9j6VIv+Up1Mtio+ MgI9nBnrXjQ1ILNZggyjfY8czVWbbRIVkpSNBd9IjZyLdjdqHObkZneCvQD24Fagu99g JJZ77S6PR4VZo8Cyk/pquwUlUpLFcA4YJB1GwcVGbPlqfBxyVcwUh1mdzRrSMknNbn5b acgA== X-Gm-Message-State: AG10YORH6pxzLgZc9uuss86e9o4lIkIdLVfrYjkJQxDgdv/+8uLp9qkSqQ5i607aThWxSvOW X-Received: by 10.98.80.12 with SMTP id e12mr33058070pfb.62.1453811192052; Tue, 26 Jan 2016 04:26:32 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id r26sm1720088pfb.21.2016.01.26.04.26.29 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Jan 2016 04:26:31 -0800 (PST) From: Baolin Wang To: herbert@gondor.apana.org.au, davem@davemloft.net Cc: broonie@kernel.org, linus.walleij@linaro.org, arnd@arndb.de, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, baolin.wang@linaro.org Subject: [PATCH 1/3] crypto: Introduce crypto_queue_len() helper function Date: Tue, 26 Jan 2016 20:25:38 +0800 Message-Id: <75865be3c2ff947df2fa422d37a7d404c320e15b.1453810716.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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 --- include/crypto/algapi.h | 4 ++++ 1 file changed, 4 insertions(+) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index c9fe145..4f861c4 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);