[CRYPTO] digest: Remove unnecessary zeroing during init
[safe/jmp/linux-2.6] / crypto / tgr192.c
index 2d8e44f..004bb84 100644 (file)
@@ -500,7 +500,6 @@ static void tgr192_init(void *ctx)
 {
        struct tgr192_ctx *tctx = ctx;
 
-       memset (tctx->hash, 0, 64);
        tctx->a = 0x0123456789abcdefULL;
        tctx->b = 0xfedcba9876543210ULL;
        tctx->c = 0xf096a5b4c3b2e187ULL;
@@ -627,6 +626,7 @@ static struct crypto_alg tgr192 = {
        .cra_blocksize = TGR192_BLOCK_SIZE,
        .cra_ctxsize = sizeof(struct tgr192_ctx),
        .cra_module = THIS_MODULE,
+       .cra_alignmask = 7,
        .cra_list = LIST_HEAD_INIT(tgr192.cra_list),
        .cra_u = {.digest = {
                             .dia_digestsize = TGR192_DIGEST_SIZE,
@@ -641,6 +641,7 @@ static struct crypto_alg tgr160 = {
        .cra_blocksize = TGR192_BLOCK_SIZE,
        .cra_ctxsize = sizeof(struct tgr192_ctx),
        .cra_module = THIS_MODULE,
+       .cra_alignmask = 7,
        .cra_list = LIST_HEAD_INIT(tgr160.cra_list),
        .cra_u = {.digest = {
                             .dia_digestsize = TGR160_DIGEST_SIZE,
@@ -655,6 +656,7 @@ static struct crypto_alg tgr128 = {
        .cra_blocksize = TGR192_BLOCK_SIZE,
        .cra_ctxsize = sizeof(struct tgr192_ctx),
        .cra_module = THIS_MODULE,
+       .cra_alignmask = 7,
        .cra_list = LIST_HEAD_INIT(tgr128.cra_list),
        .cra_u = {.digest = {
                             .dia_digestsize = TGR128_DIGEST_SIZE,