linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Subject: [RFC PATCH 1/3] crypto: shash - remove useless crypto_yield() in shash_ahash_digest()
Date: Sun, 14 Apr 2019 17:37:07 -0700	[thread overview]
Message-ID: <20190415003709.1531-2-ebiggers@kernel.org> (raw)
In-Reply-To: <20190415003709.1531-1-ebiggers@kernel.org>

From: Eric Biggers <ebiggers@google.com>

The crypto_yield() in shash_ahash_digest() occurs after the entire
digest operation already happened, so there's no real point.  Remove it.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 crypto/shash.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/crypto/shash.c b/crypto/shash.c
index b85930e9a7a2e..599468478f7bb 100644
--- a/crypto/shash.c
+++ b/crypto/shash.c
@@ -314,7 +314,6 @@ int shash_ahash_digest(struct ahash_request *req, struct shash_desc *desc)
 		err = crypto_shash_digest(desc, data + offset, nbytes,
 					  req->result);
 		kunmap_atomic(data);
-		crypto_yield(desc->flags);
 	} else
 		err = crypto_shash_init(desc) ?:
 		      shash_ahash_finup(req, desc);
-- 
2.21.0


  reply	other threads:[~2019-04-15  0:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15  0:37 [RFC PATCH 0/3] crypto: remove shash_desc::flags Eric Biggers
2019-04-15  0:37 ` Eric Biggers [this message]
2019-04-15  0:37 ` [RFC PATCH 2/3] crypto: nx - don't abuse shash MAY_SLEEP flag Eric Biggers
2019-04-15  5:12   ` Michael Ellerman
2019-04-15  0:37 ` [RFC PATCH 3/3] crypto: shash - remove shash_desc::flags Eric Biggers
2019-04-25  7:49 ` [RFC PATCH 0/3] crypto: " Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190415003709.1531-2-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).