[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <10b7259b-3c73-1c87-6ccd-914da9c796dd@linux.ibm.com>
Date: Wed, 12 Jun 2019 12:30:23 +0200
From: Harald Freudenberger <freude@...ux.ibm.com>
To: David Hildenbrand <david@...hat.com>, linux-kernel@...r.kernel.org
Cc: linux-s390@...r.kernel.org, linux-crypto@...r.kernel.org,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
Cornelia Huck <cohuck@...hat.com>
Subject: Re: [PATCH v2 4/4] s390/crypto: sha: Use -ENODEV instead of
-EOPNOTSUPP
On 12.06.19 12:22, David Hildenbrand wrote:
> Let's use the error value that is typically used if HW support is not
> available when trying to load a module - this is also what systemd's
> systemd-modules-load.service expects.
>
> Signed-off-by: David Hildenbrand <david@...hat.com>
> ---
> arch/s390/crypto/sha1_s390.c | 2 +-
> arch/s390/crypto/sha256_s390.c | 2 +-
> arch/s390/crypto/sha512_s390.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/s390/crypto/sha1_s390.c b/arch/s390/crypto/sha1_s390.c
> index 009572e8276d..7c15542d3685 100644
> --- a/arch/s390/crypto/sha1_s390.c
> +++ b/arch/s390/crypto/sha1_s390.c
> @@ -86,7 +86,7 @@ static struct shash_alg alg = {
> static int __init sha1_s390_init(void)
> {
> if (!cpacf_query_func(CPACF_KIMD, CPACF_KIMD_SHA_1))
> - return -EOPNOTSUPP;
> + return -ENODEV;
> return crypto_register_shash(&alg);
> }
>
> diff --git a/arch/s390/crypto/sha256_s390.c b/arch/s390/crypto/sha256_s390.c
> index 62833a1d8724..af7505148f80 100644
> --- a/arch/s390/crypto/sha256_s390.c
> +++ b/arch/s390/crypto/sha256_s390.c
> @@ -117,7 +117,7 @@ static int __init sha256_s390_init(void)
> int ret;
>
> if (!cpacf_query_func(CPACF_KIMD, CPACF_KIMD_SHA_256))
> - return -EOPNOTSUPP;
> + return -ENODEV;
> ret = crypto_register_shash(&sha256_alg);
> if (ret < 0)
> goto out;
> diff --git a/arch/s390/crypto/sha512_s390.c b/arch/s390/crypto/sha512_s390.c
> index be589c340d15..ad29db085a18 100644
> --- a/arch/s390/crypto/sha512_s390.c
> +++ b/arch/s390/crypto/sha512_s390.c
> @@ -127,7 +127,7 @@ static int __init init(void)
> int ret;
>
> if (!cpacf_query_func(CPACF_KIMD, CPACF_KIMD_SHA_512))
> - return -EOPNOTSUPP;
> + return -ENODEV;
> if ((ret = crypto_register_shash(&sha512_alg)) < 0)
> goto out;
> if ((ret = crypto_register_shash(&sha384_alg)) < 0)
fine with me
Reviewed-by: Harald Freudenberger <freude@...ux.ibm.com>
Powered by blists - more mailing lists