summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/omap-sham.c
diff options
context:
space:
mode:
authorDmitry Kasatkin <dmitry.kasatkin@nokia.com>2010-11-19 15:04:28 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2010-11-27 09:37:19 +0100
commita55b290b0e41e02d1969589c5d77d966ac2b7ec8 (patch)
treefcbff88a3f115e3bf4055d33388c72774f5e9982 /drivers/crypto/omap-sham.c
parentcrypto: omap-sham - hash-in-progress is stored in hw format (diff)
downloadlinux-a55b290b0e41e02d1969589c5d77d966ac2b7ec8.tar.xz
linux-a55b290b0e41e02d1969589c5d77d966ac2b7ec8.zip
crypto: omap-sham - FLAGS_FIRST is redundant and removed
bufcnt is 0 if it was no update requests before, which is exact meaning of FLAGS_FIRST. Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@nokia.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/omap-sham.c')
-rw-r--r--drivers/crypto/omap-sham.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index c8d30eb4794a..d88d7ebfffa7 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -72,7 +72,6 @@
#define DEFAULT_TIMEOUT_INTERVAL HZ
-#define FLAGS_FIRST 0x0001
#define FLAGS_FINUP 0x0002
#define FLAGS_FINAL 0x0004
#define FLAGS_FAST 0x0008
@@ -513,8 +512,6 @@ static int omap_sham_init(struct ahash_request *req)
ctx->flags = 0;
- ctx->flags |= FLAGS_FIRST;
-
dev_dbg(dd->dev, "init: digest size: %d\n",
crypto_ahash_digestsize(tfm));
@@ -739,12 +736,9 @@ static int omap_sham_update(struct ahash_request *req)
/* may be can use faster functions */
int aligned = IS_ALIGNED((u32)ctx->sg->offset,
sizeof(u32));
-
- if (aligned && (ctx->flags & FLAGS_FIRST))
+ if (aligned)
/* digest: first and final */
ctx->flags |= FLAGS_FAST;
-
- ctx->flags &= ~FLAGS_FIRST;
}
} else if (ctx->bufcnt + ctx->total <= ctx->buflen) {
/* if not finaup -> not fast */