[PATCH 4/4] ASoC: cros_ec_codec: use sha256() instead of open coding

Tzung-Bi Shih tzungbi at google.com
Wed Jul 8 04:29:40 CEST 2020


On Wed, Jul 8, 2020 at 2:59 AM Eric Biggers <ebiggers at kernel.org> wrote:
>
> From: Eric Biggers <ebiggers at google.com>
>
> Now that there's a function that calculates the SHA-256 digest of a
> buffer in one step, use it instead of sha256_init() + sha256_update() +
> sha256_final().
>
> Also simplify the code by inlining calculate_sha256() into its caller
> and switching a debug log statement to use %*phN instead of bin2hex().
>
> Cc: alsa-devel at alsa-project.org
> Cc: Ard Biesheuvel <ardb at kernel.org>
> Cc: Cheng-Yi Chiang <cychiang at chromium.org>
> Cc: Enric Balletbo i Serra <enric.balletbo at collabora.com>
> Cc: Guenter Roeck <groeck at chromium.org>
> Cc: Tzung-Bi Shih <tzungbi at google.com>
> Signed-off-by: Eric Biggers <ebiggers at google.com>

Acked-by: Tzung-Bi Shih <tzungbi at google.com>


More information about the Alsa-devel mailing list