All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: ecdh - remove empty exit()
@ 2017-11-02 14:46 Tudor Ambarus
  2017-11-06  7:08 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Tudor Ambarus @ 2017-11-02 14:46 UTC (permalink / raw)
  To: herbert; +Cc: linux-crypto, Tudor Ambarus

Pointer members of an object with static storage duration, if not
explicitly initialized, will be initialized to a NULL pointer. The crypto
API checks if this pointer is not NULL before using it, we are safe to
remove the function.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
 crypto/ecdh.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/crypto/ecdh.c b/crypto/ecdh.c
index 4271fc7..3aca093 100644
--- a/crypto/ecdh.c
+++ b/crypto/ecdh.c
@@ -131,17 +131,11 @@ static unsigned int ecdh_max_size(struct crypto_kpp *tfm)
 	return ctx->ndigits << (ECC_DIGITS_TO_BYTES_SHIFT + 1);
 }
 
-static void no_exit_tfm(struct crypto_kpp *tfm)
-{
-	return;
-}
-
 static struct kpp_alg ecdh = {
 	.set_secret = ecdh_set_secret,
 	.generate_public_key = ecdh_compute_value,
 	.compute_shared_secret = ecdh_compute_value,
 	.max_size = ecdh_max_size,
-	.exit = no_exit_tfm,
 	.base = {
 		.cra_name = "ecdh",
 		.cra_driver_name = "ecdh-generic",
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] crypto: ecdh - remove empty exit()
  2017-11-02 14:46 [PATCH] crypto: ecdh - remove empty exit() Tudor Ambarus
@ 2017-11-06  7:08 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2017-11-06  7:08 UTC (permalink / raw)
  To: Tudor Ambarus; +Cc: linux-crypto

On Thu, Nov 02, 2017 at 04:46:47PM +0200, Tudor Ambarus wrote:
> Pointer members of an object with static storage duration, if not
> explicitly initialized, will be initialized to a NULL pointer. The crypto
> API checks if this pointer is not NULL before using it, we are safe to
> remove the function.
> 
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-06  7:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-02 14:46 [PATCH] crypto: ecdh - remove empty exit() Tudor Ambarus
2017-11-06  7:08 ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.