Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1484258
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/6] crypto-caamhash: Return a value directly in caam_hash_cra_init() |
| Date | 2016-09-15 16:50 +0200 |
| Message-ID | <shG9c-8fB-45@gated-at.bofh.it> (permalink) |
| References | <qEuGl-43C-5@gated-at.bofh.it> <shFZw-8bW-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Thu, 15 Sep 2016 14:56:12 +0200 * Return a value at the end without storing it in an intermediate variable. * Delete the local variable "ret" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/crypto/caam/caamhash.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c index 933252f..b1dbc53 100644 --- a/drivers/crypto/caam/caamhash.c +++ b/drivers/crypto/caam/caamhash.c @@ -1846,7 +1846,6 @@ static int caam_hash_cra_init(struct crypto_tfm *tfm) HASH_MSG_LEN + SHA256_DIGEST_SIZE, HASH_MSG_LEN + 64, HASH_MSG_LEN + SHA512_DIGEST_SIZE }; - int ret = 0; /* * Get a Job ring from Job Ring driver to ensure in-order @@ -1866,10 +1865,7 @@ static int caam_hash_cra_init(struct crypto_tfm *tfm) crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), sizeof(struct caam_hash_state)); - - ret = ahash_set_sh_desc(ahash); - - return ret; + return ahash_set_sh_desc(ahash); } static void caam_hash_cra_exit(struct crypto_tfm *tfm) -- 2.10.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
crypto-caamhash: Fine-tuning for several function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-15 16:40 +0200
[PATCH 6/6] crypto-caamhash: Move common error handling code in two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-15 16:50 +0200
[PATCH 1/6] crypto-caamhash: Use kmalloc_array() in ahash_setkey() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-15 16:50 +0200
Re: [PATCH 1/6] crypto-caamhash: Use kmalloc_array() in ahash_setkey() Horia Geanta Neag <horia.geanta@nxp.com> - 2016-09-16 04:00 +0200
[PATCH 2/6] crypto-caamhash: Rename jump labels in ahash_setkey() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-15 16:50 +0200
[PATCH 3/6] crypto-caamhash: Rename a jump label in five functions SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-15 16:50 +0200
[PATCH 5/6] crypto-caamhash: Delete an unnecessary initialisation in seven functions SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-15 16:50 +0200
[PATCH 4/6] crypto-caamhash: Return a value directly in caam_hash_cra_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-09-15 16:50 +0200
Re: crypto-caamhash: Fine-tuning for several function implementations Horia Geanta Neag <horia.geanta@nxp.com> - 2016-09-15 22:10 +0200
Re: crypto-caamhash: Fine-tuning for several function implementations Herbert Xu <herbert@gondor.apana.org.au> - 2016-09-22 12:50 +0200
csiph-web