All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: David Sterba <dsterba@suse.com>
Cc: linux-crypto@vger.kernel.org, ard.biesheuvel@linaro.org
Subject: Re: [PATCH v3] crypto: add blake2b generic implementation
Date: Thu, 10 Oct 2019 15:29:19 -0700	[thread overview]
Message-ID: <20191010222918.GC143518@gmail.com> (raw)
In-Reply-To: <e7f46def436c2c705c0b2cac3324f817efa4717d.1570715842.git.dsterba@suse.com>

A couple more comments:

On Thu, Oct 10, 2019 at 04:10:05PM +0200, David Sterba wrote:
> +static void blake2b_set_lastnode(struct blake2b_state *S)
> +{
> +	S->f[1] = (u64)-1;
> +}
> +
[...]
> +static void blake2b_set_lastblock(struct blake2b_state *S)
> +{
> +	if (S->last_node)
> +		blake2b_set_lastnode(S);
> +

last_node is never true, so this is dead code.

> +struct digest_desc_ctx {
> +	struct blake2b_state S[1];
> +};

This indirection isn't needed.  Just use struct blake2b_state directly as the
shash_desc_ctx.

- Eric

      parent reply	other threads:[~2019-10-10 22:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 14:10 [PATCH v3] crypto: add blake2b generic implementation David Sterba
2019-10-10 14:45 ` Ard Biesheuvel
2019-10-10 22:12 ` Eric Biggers
2019-10-11 12:04   ` David Sterba
2019-10-10 22:29 ` Eric Biggers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191010222918.GC143518@gmail.com \
    --to=ebiggers@kernel.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=dsterba@suse.com \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.