Commit a55b290b0e41e02d1969589c5d77d966ac2b7ec8
Committed by
Herbert Xu
1 parent
3c8d758ab5
Exists in
master
and in
7 other branches
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>
Showing 1 changed file with 1 additions and 7 deletions Side-by-side Diff
drivers/crypto/omap-sham.c
... | ... | @@ -72,7 +72,6 @@ |
72 | 72 | |
73 | 73 | #define DEFAULT_TIMEOUT_INTERVAL HZ |
74 | 74 | |
75 | -#define FLAGS_FIRST 0x0001 | |
76 | 75 | #define FLAGS_FINUP 0x0002 |
77 | 76 | #define FLAGS_FINAL 0x0004 |
78 | 77 | #define FLAGS_FAST 0x0008 |
... | ... | @@ -513,8 +512,6 @@ |
513 | 512 | |
514 | 513 | ctx->flags = 0; |
515 | 514 | |
516 | - ctx->flags |= FLAGS_FIRST; | |
517 | - | |
518 | 515 | dev_dbg(dd->dev, "init: digest size: %d\n", |
519 | 516 | crypto_ahash_digestsize(tfm)); |
520 | 517 | |
521 | 518 | |
... | ... | @@ -739,12 +736,9 @@ |
739 | 736 | /* may be can use faster functions */ |
740 | 737 | int aligned = IS_ALIGNED((u32)ctx->sg->offset, |
741 | 738 | sizeof(u32)); |
742 | - | |
743 | - if (aligned && (ctx->flags & FLAGS_FIRST)) | |
739 | + if (aligned) | |
744 | 740 | /* digest: first and final */ |
745 | 741 | ctx->flags |= FLAGS_FAST; |
746 | - | |
747 | - ctx->flags &= ~FLAGS_FIRST; | |
748 | 742 | } |
749 | 743 | } else if (ctx->bufcnt + ctx->total <= ctx->buflen) { |
750 | 744 | /* if not finaup -> not fast */ |