linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3]crypto:hifn_795x.c Fix warning: variable 'ctx' set but not used
@ 2010-07-06 18:36 Justin P. Mattock
  2010-07-06 18:58 ` Evgeniy Polyakov
  2010-07-14 12:12 ` Herbert Xu
  0 siblings, 2 replies; 5+ messages in thread
From: Justin P. Mattock @ 2010-07-06 18:36 UTC (permalink / raw)
  To: linux-crypto; +Cc: herbert, davem, jkosina, kim.phillips, 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

 Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

---
 drivers/crypto/hifn_795x.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index 16fce3a..e449ac5 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -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);
-- 
1.7.1.rc1.21.gf3bd6

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

* Re: [PATCH v3]crypto:hifn_795x.c Fix warning: variable 'ctx' set but not used
  2010-07-06 18:36 [PATCH v3]crypto:hifn_795x.c Fix warning: variable 'ctx' set but not used Justin P. Mattock
@ 2010-07-06 18:58 ` Evgeniy Polyakov
  2010-07-06 19:27   ` Justin P. Mattock
  2010-07-14 12:12 ` Herbert Xu
  1 sibling, 1 reply; 5+ messages in thread
From: Evgeniy Polyakov @ 2010-07-06 18:58 UTC (permalink / raw)
  To: Justin P. Mattock; +Cc: linux-crypto, herbert, davem, jkosina, kim.phillips

On Tue, Jul 06, 2010 at 11:36:37AM -0700, Justin P. Mattock (justinmattock@gmail.com) wrote:
> 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
> 
>  Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

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

-- 
	Evgeniy Polyakov

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

* Re: [PATCH v3]crypto:hifn_795x.c Fix warning: variable 'ctx' set but not used
  2010-07-06 18:58 ` Evgeniy Polyakov
@ 2010-07-06 19:27   ` Justin P. Mattock
  0 siblings, 0 replies; 5+ messages in thread
From: Justin P. Mattock @ 2010-07-06 19:27 UTC (permalink / raw)
  To: Evgeniy Polyakov; +Cc: linux-crypto, herbert, davem, jkosina, kim.phillips

On 07/06/2010 11:58 AM, Evgeniy Polyakov wrote:
> On Tue, Jul 06, 2010 at 11:36:37AM -0700, Justin P. Mattock (justinmattock@gmail.com) wrote:
>> 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
>>
>>   Signed-off-by: Justin P. Mattock<justinmattock@gmail.com>
>
> 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

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

* Re: [PATCH v3]crypto:hifn_795x.c Fix warning: variable 'ctx' set but not used
  2010-07-06 18:36 [PATCH v3]crypto:hifn_795x.c Fix warning: variable 'ctx' set but not used Justin P. Mattock
  2010-07-06 18:58 ` Evgeniy Polyakov
@ 2010-07-14 12:12 ` Herbert Xu
  2010-07-14 13:35   ` Justin P. Mattock
  1 sibling, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2010-07-14 12:12 UTC (permalink / raw)
  To: Justin P. Mattock; +Cc: linux-crypto, davem, jkosina, kim.phillips

On Tue, Jul 06, 2010 at 11:36:37AM -0700, Justin P. Mattock wrote:
> 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
> 
>  Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

Patch applied.  Thanks Justin!
-- 
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] 5+ messages in thread

* Re: [PATCH v3]crypto:hifn_795x.c Fix warning: variable 'ctx' set but not used
  2010-07-14 12:12 ` Herbert Xu
@ 2010-07-14 13:35   ` Justin P. Mattock
  0 siblings, 0 replies; 5+ messages in thread
From: Justin P. Mattock @ 2010-07-14 13:35 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto, davem, jkosina, kim.phillips

On 07/14/2010 05:12 AM, Herbert Xu wrote:
> On Tue, Jul 06, 2010 at 11:36:37AM -0700, Justin P. Mattock wrote:
>> 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
>>
>>   Signed-off-by: Justin P. Mattock<justinmattock@gmail.com>
>
> Patch applied.  Thanks Justin!

o.k.!!

cheers,

Justin P. Mattock

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

end of thread, other threads:[~2010-07-14 13:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-06 18:36 [PATCH v3]crypto:hifn_795x.c Fix warning: variable 'ctx' set but not used Justin P. Mattock
2010-07-06 18:58 ` Evgeniy Polyakov
2010-07-06 19:27   ` Justin P. Mattock
2010-07-14 12:12 ` Herbert Xu
2010-07-14 13:35   ` Justin P. Mattock

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).