From: David Hildenbrand <david@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-s390@vger.kernel.org, linux-crypto@vger.kernel.org,
David Hildenbrand <david@redhat.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Harald Freudenberger <freude@linux.ibm.com>,
Cornelia Huck <cohuck@redhat.com>
Subject: [PATCH v2 3/4] s390/crypto: prng: Use -ENODEV instead of -EOPNOTSUPP
Date: Wed, 12 Jun 2019 12:22:47 +0200 [thread overview]
Message-ID: <20190612102248.18903-4-david@redhat.com> (raw)
In-Reply-To: <20190612102248.18903-1-david@redhat.com>
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@redhat.com>
---
arch/s390/crypto/prng.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c
index 12cca467af7d..d977643fa627 100644
--- a/arch/s390/crypto/prng.c
+++ b/arch/s390/crypto/prng.c
@@ -824,7 +824,7 @@ static int __init prng_init(void)
/* check if the CPU has a PRNG */
if (!cpacf_query_func(CPACF_KMC, CPACF_KMC_PRNG))
- return -EOPNOTSUPP;
+ return -ENODEV;
/* check if TRNG subfunction is available */
if (cpacf_query_func(CPACF_PRNO, CPACF_PRNO_TRNG))
@@ -837,7 +837,7 @@ static int __init prng_init(void)
if (prng_mode == PRNG_MODE_SHA512) {
pr_err("The prng module cannot "
"start in SHA-512 mode\n");
- return -EOPNOTSUPP;
+ return -ENODEV;
}
prng_mode = PRNG_MODE_TDES;
} else
--
2.21.0
next prev parent reply other threads:[~2019-06-12 10:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 10:22 [PATCH v2 0/4] s390/crypto: Use -ENODEV instead of -EOPNOTSUPP David Hildenbrand
2019-06-12 10:22 ` [PATCH v2 1/4] s390/pkey: " David Hildenbrand
2019-06-12 10:39 ` Harald Freudenberger
2019-06-12 10:41 ` David Hildenbrand
2019-06-12 11:07 ` Harald Freudenberger
2019-06-12 11:08 ` David Hildenbrand
2019-06-12 10:22 ` [PATCH v2 2/4] s390/crypto: ghash: " David Hildenbrand
2019-06-12 10:31 ` Harald Freudenberger
2019-06-12 10:32 ` Cornelia Huck
2019-06-12 10:22 ` David Hildenbrand [this message]
2019-06-12 10:31 ` [PATCH v2 3/4] s390/crypto: prng: " Harald Freudenberger
2019-06-12 10:35 ` Cornelia Huck
2019-06-12 10:22 ` [PATCH v2 4/4] s390/crypto: sha: " David Hildenbrand
2019-06-12 10:30 ` Harald Freudenberger
2019-06-12 10:37 ` Cornelia Huck
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=20190612102248.18903-4-david@redhat.com \
--to=david@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=davem@davemloft.net \
--cc=freude@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@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.