Re: [PATCH v4 2/2] crypto: hisilicon/advca - Add SHA support

From: Herbert Xu
Date: Fri Jun 16 2023 - 07:04:38 EST


On Tue, Jun 06, 2023 at 03:11:12PM +0800, David Yang wrote:
.
> +/*
> + * must be called before setting SHA_START
> + * does nothing if import is not supported (SHA_TYPE_HASH)
> + */
> +static void hica_sha_import(const struct hica_sha_priv *priv, const void *state)
> +{
> + if (priv->type != SHA_TYPE_MHASH)
> + return;

As you may have noticed from the void return type, an import is
not allowed to fail. If you have to fail then you're doing something
wrong.

Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt