Skip to contentSkip to conversation

crypto:hifn_795x.c Fix warning: variable 'ctx' set but not used

PATCH In review Justin P. Mattock 3 participants 5 messages Jul 6, 2010 – Jul 14, 2010 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 crypto:hifn_795x.c Fix warning: variable 'ctx' set but not used

The below patch gets rid of an unused variable ctx reported by GCC when building the kernel.
CC [M] drivers/crypto/hifn_795x.o
drivers/crypto/hifn_795x.c: In function 'hifn_flush':
drivers/crypto/hifn_795x.c:2021:23: warning: variable 'ctx' set but not used drivers/crypto/hifn_795x.c: In function 'hifn_process_queue':
drivers/crypto/hifn_795x.c:2142:23: warning: variable 'ctx' set but not used

---
 drivers/crypto/hifn_795x.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
drivers/crypto/hifn_795x.c +0 -4
index 16fce3a..e449ac5 100644
@@ -2018,7 +2018,6 @@ static void hifn_flush(struct hifn_device *dev)
 {
 	unsigned long flags;
 	struct crypto_async_request *async_req;
-	struct hifn_context *ctx;
 	struct ablkcipher_request *req;
 	struct hifn_dma *dma = (struct hifn_dma *)dev->desc_virt;
 	int i;
@@ -2035,7 +2034,6 @@ static void hifn_flush(struct hifn_device *dev)
 
 	spin_lock_irqsave(&dev->lock, flags);
 	while ((async_req = crypto_dequeue_request(&dev->queue))) {
-		ctx = crypto_tfm_ctx(async_req->tfm);
 		req = container_of(async_req, struct ablkcipher_request, base);
 		spin_unlock_irqrestore(&dev->lock, flags);
 
@@ -2139,7 +2137,6 @@ static int hifn_setup_crypto_req(struct ablkcipher_request *req, u8 op,
 static int hifn_process_queue(struct hifn_device *dev)
 {
 	struct crypto_async_request *async_req, *backlog;
-	struct hifn_context *ctx;
 	struct ablkcipher_request *req;
 	unsigned long flags;
 	int err = 0;
@@ -2156,7 +2153,6 @@ static int hifn_process_queue(struct hifn_device *dev)
 		if (backlog)
 			backlog->complete(backlog, -EINPROGRESS);
 
-		ctx = crypto_tfm_ctx(async_req->tfm);
 		req = container_of(async_req, struct ablkcipher_request, base);
 
 		err = hifn_handle_req(req);
Signature · 1 line
1.7.1.rc1.21.gf3bd6
#1 lore raw
Quoted 9 lines · Justin P. Mattock

The below patch gets rid of an unused variable ctx reported by GCC when building the kernel.
CC [M] drivers/crypto/hifn_795x.o
drivers/crypto/hifn_795x.c: In function 'hifn_flush':
drivers/crypto/hifn_795x.c:2021:23: warning: variable 'ctx' set but not used drivers/crypto/hifn_795x.c: In function 'hifn_process_queue':
drivers/crypto/hifn_795x.c:2142:23: warning: variable 'ctx' set but not used

Looks good, thank you.
I can only wonder how I wanted to use it in that context...

Signature · 1 line
	Evgeniy Polyakov
#2 lore raw
Quoted 9 lines · Evgeniy Polyakov
Quoted 8 lines · Justin P. Mattock

The below patch gets rid of an unused variable ctx reported by GCC when building the kernel.
CC [M] drivers/crypto/hifn_795x.o
drivers/crypto/hifn_795x.c: In function 'hifn_flush':
drivers/crypto/hifn_795x.c:2021:23: warning: variable 'ctx' set but not used drivers/crypto/hifn_795x.c: In function 'hifn_process_queue':
drivers/crypto/hifn_795x.c:2142:23: warning: variable 'ctx' set but not used

Quoted 5 lines
Quoted 1 line

Looks good, thank you.
I can only wonder how I wanted to use it in that context...

sure no problem.. s for the question how I wanted to use it in that context... not sure.. if you have any ideas, let me know I can test it out for you..

Justin P. Mattock

maintainer
#3 lore raw
In reply to Justin P. Mattock
Quoted 9 lines · Justin P. Mattock

The below patch gets rid of an unused variable ctx reported by GCC when building the kernel.
CC [M] drivers/crypto/hifn_795x.o
drivers/crypto/hifn_795x.c: In function 'hifn_flush':
drivers/crypto/hifn_795x.c:2021:23: warning: variable 'ctx' set but not used drivers/crypto/hifn_795x.c: In function 'hifn_process_queue':
drivers/crypto/hifn_795x.c:2142:23: warning: variable 'ctx' set but not used

Patch applied. Thanks Justin!

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
#4 lore raw
Quoted 9 lines · Herbert Xu
Quoted 8 lines · Justin P. Mattock

The below patch gets rid of an unused variable ctx reported by GCC when building the kernel.
CC [M] drivers/crypto/hifn_795x.o
drivers/crypto/hifn_795x.c: In function 'hifn_flush':
drivers/crypto/hifn_795x.c:2021:23: warning: variable 'ctx' set but not used drivers/crypto/hifn_795x.c: In function 'hifn_process_queue':
drivers/crypto/hifn_795x.c:2142:23: warning: variable 'ctx' set but not used

Quoted 3 lines
Quoted 1 line

Patch applied. Thanks Justin!

o.k.!!

cheers,

Justin P. Mattock