mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 10:01:25 +00:00
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>
This commit is contained in:
parent
3c8d758ab5
commit
a55b290b0e
1 changed files with 1 additions and 7 deletions
|
@ -72,7 +72,6 @@
|
||||||
|
|
||||||
#define DEFAULT_TIMEOUT_INTERVAL HZ
|
#define DEFAULT_TIMEOUT_INTERVAL HZ
|
||||||
|
|
||||||
#define FLAGS_FIRST 0x0001
|
|
||||||
#define FLAGS_FINUP 0x0002
|
#define FLAGS_FINUP 0x0002
|
||||||
#define FLAGS_FINAL 0x0004
|
#define FLAGS_FINAL 0x0004
|
||||||
#define FLAGS_FAST 0x0008
|
#define FLAGS_FAST 0x0008
|
||||||
|
@ -513,8 +512,6 @@ static int omap_sham_init(struct ahash_request *req)
|
||||||
|
|
||||||
ctx->flags = 0;
|
ctx->flags = 0;
|
||||||
|
|
||||||
ctx->flags |= FLAGS_FIRST;
|
|
||||||
|
|
||||||
dev_dbg(dd->dev, "init: digest size: %d\n",
|
dev_dbg(dd->dev, "init: digest size: %d\n",
|
||||||
crypto_ahash_digestsize(tfm));
|
crypto_ahash_digestsize(tfm));
|
||||||
|
|
||||||
|
@ -739,12 +736,9 @@ static int omap_sham_update(struct ahash_request *req)
|
||||||
/* may be can use faster functions */
|
/* may be can use faster functions */
|
||||||
int aligned = IS_ALIGNED((u32)ctx->sg->offset,
|
int aligned = IS_ALIGNED((u32)ctx->sg->offset,
|
||||||
sizeof(u32));
|
sizeof(u32));
|
||||||
|
if (aligned)
|
||||||
if (aligned && (ctx->flags & FLAGS_FIRST))
|
|
||||||
/* digest: first and final */
|
/* digest: first and final */
|
||||||
ctx->flags |= FLAGS_FAST;
|
ctx->flags |= FLAGS_FAST;
|
||||||
|
|
||||||
ctx->flags &= ~FLAGS_FIRST;
|
|
||||||
}
|
}
|
||||||
} else if (ctx->bufcnt + ctx->total <= ctx->buflen) {
|
} else if (ctx->bufcnt + ctx->total <= ctx->buflen) {
|
||||||
/* if not finaup -> not fast */
|
/* if not finaup -> not fast */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue