From: "Justin P. Mattock" Subject: [PATCH]crypto:hifn_795x.c Fix warning: variable 'ctx' set but not used Date: Mon, 5 Jul 2010 23:26:14 -0700 Message-ID: <1278397574-25217-1-git-send-email-justinmattock@gmail.com> Cc: davem@davemloft.net, jkosina@suse.cz, linux-kernel@vger.kernel.org, "Justin P. Mattock" To: linux-crypto@vger.kernel.org Return-path: Received: from mail-pz0-f46.google.com ([209.85.210.46]:41693 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752746Ab0GFG0I (ORCPT ); Tue, 6 Jul 2010 02:26:08 -0400 Sender: linux-crypto-owner@vger.kernel.org List-ID: The below fixes a warning message generated by GCC 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 Please have a look, and let me know if this is legit or not. Signed-off-by: Justin P. Mattock --- drivers/crypto/hifn_795x.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index 16fce3a..e7aa4dc 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c @@ -2036,6 +2036,11 @@ 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); + if (ctx) { + dprintk("%s: Flushing shash. %s\n", + dev->name, ctx); + return; + } req = container_of(async_req, struct ablkcipher_request, base); spin_unlock_irqrestore(&dev->lock, flags); @@ -2157,6 +2162,11 @@ static int hifn_process_queue(struct hifn_device *dev) backlog->complete(backlog, -EINPROGRESS); ctx = crypto_tfm_ctx(async_req->tfm); + if (ctx) { + dprintk("%s: shash in queue. %s\n", + dev->name, ctx); + return 0; + } req = container_of(async_req, struct ablkcipher_request, base); err = hifn_handle_req(req); -- 1.7.1.rc1.21.gf3bd6