Skip to contentSkip to conversation

crypto: cryptd - Remove unused but set variable 'tfm'

PATCH In review Tobias Klauser 2 participants 2 messages Oct 31, 2016 – Nov 1, 2016 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: cryptd - Remove unused but set variable 'tfm'

Remove the unused but set variable tfm in cryptd_enqueue_request to fix the following warning when building with 'W=1':

crypto/cryptd.c:125:21: warning: variable 'tfm' set but not used [-Wunused-but-set-variable]

---
 crypto/cryptd.c | 2 --
 1 file changed, 2 deletions(-)
crypto/cryptd.c +0 -2
index 0c654e59f215..3fd2a20a8145 100644
@@ -122,7 +122,6 @@ static int cryptd_enqueue_request(struct cryptd_queue *queue,
 {
 	int cpu, err;
 	struct cryptd_cpu_queue *cpu_queue;
-	struct crypto_tfm *tfm;
 	atomic_t *refcnt;
 	bool may_backlog;
 
@@ -141,7 +140,6 @@ static int cryptd_enqueue_request(struct cryptd_queue *queue,
 	if (!atomic_read(refcnt))
 		goto out_put_cpu;
 
-	tfm = request->tfm;
 	atomic_inc(refcnt);
 
 out_put_cpu:
Signature · 1 line
2.9.0
maintainer
#1 lore raw
Quoted 6 lines · Tobias Klauser

Remove the unused but set variable tfm in cryptd_enqueue_request to fix the following warning when building with 'W=1':

crypto/cryptd.c:125:21: warning: variable 'tfm' set but not used [-Wunused-but-set-variable]

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt