From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Renaud Barbier <Renaud.Barbier@ametek.com>
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>, barebox@lists.infradead.org
Subject: [PATCH] crypto: Followup to crypto symbol renaming for algo registration
Date: Tue, 22 Mar 2022 10:00:07 +0100 [thread overview]
Message-ID: <20220322090007.233155-1-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <32d47eaa-df0b-c949-ffd0-89e19ca1f244@pengutronix.de>
The symbols were renamed to a nicer and consistent naming scheme, but I
missed to adapt a few usages.
This was done using:
perl -p -i -e 's/\bCONFIG_(?:DIGEST_)?(MD5|SHA1|SHA224|SHA256|SHA384|SHA512|HMAC)\b/CONFIG_HAVE_DIGEST_$1/;' crypto/hmac.c crypto/sha2.c crypto/sha4.c
Now there don't seem to be any old names left:
Reported-by: Renaud Barbier <Renaud.Barbier@ametek.com>
Fixes: 03fb5524b064 ("crypto: consistently name the algo digest symbols HAVE_DIGEST_...")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
crypto/hmac.c | 12 ++++++------
crypto/sha2.c | 4 ++--
crypto/sha4.c | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/crypto/hmac.c b/crypto/hmac.c
index 37b270df7a95..20fc470d9059 100644
--- a/crypto/hmac.c
+++ b/crypto/hmac.c
@@ -181,17 +181,17 @@ static int digest_hmac_register(char *name, unsigned int pad_length)
static int digest_hmac_initcall(void)
{
- if (IS_ENABLED(CONFIG_MD5))
+ if (IS_ENABLED(CONFIG_HAVE_DIGEST_MD5))
digest_hmac_register("md5", 64);
- if (IS_ENABLED(CONFIG_SHA1))
+ if (IS_ENABLED(CONFIG_HAVE_DIGEST_SHA1))
digest_hmac_register("sha1", 64);
- if (IS_ENABLED(CONFIG_SHA224))
+ if (IS_ENABLED(CONFIG_HAVE_DIGEST_SHA224))
digest_hmac_register("sha224", 64);
- if (IS_ENABLED(CONFIG_SHA256))
+ if (IS_ENABLED(CONFIG_HAVE_DIGEST_SHA256))
digest_hmac_register("sha256", 64);
- if (IS_ENABLED(CONFIG_SHA384))
+ if (IS_ENABLED(CONFIG_HAVE_DIGEST_SHA384))
digest_hmac_register("sha384", 128);
- if (IS_ENABLED(CONFIG_SHA512))
+ if (IS_ENABLED(CONFIG_HAVE_DIGEST_SHA512))
digest_hmac_register("sha512", 128);
return 0;
diff --git a/crypto/sha2.c b/crypto/sha2.c
index 013f5bb3b248..cac509564814 100644
--- a/crypto/sha2.c
+++ b/crypto/sha2.c
@@ -338,7 +338,7 @@ static struct digest_algo m224 = {
static int sha224_digest_register(void)
{
- if (!IS_ENABLED(CONFIG_SHA224))
+ if (!IS_ENABLED(CONFIG_HAVE_DIGEST_SHA224))
return 0;
return digest_algo_register(&m224);
@@ -365,7 +365,7 @@ struct digest_algo m256 = {
#ifndef __PBL__
static int sha256_digest_register(void)
{
- if (!IS_ENABLED(CONFIG_SHA256))
+ if (!IS_ENABLED(CONFIG_HAVE_DIGEST_SHA256))
return 0;
return digest_algo_register(&m256);
diff --git a/crypto/sha4.c b/crypto/sha4.c
index a2e90c0a2cae..8c94f5011dc2 100644
--- a/crypto/sha4.c
+++ b/crypto/sha4.c
@@ -258,7 +258,7 @@ static struct digest_algo m384 = {
static int sha384_digest_register(void)
{
- if (!IS_ENABLED(CONFIG_SHA384))
+ if (!IS_ENABLED(CONFIG_HAVE_DIGEST_SHA384))
return 0;
return digest_algo_register(&m384);
@@ -284,7 +284,7 @@ static struct digest_algo m512 = {
static int sha512_digest_register(void)
{
- if (!IS_ENABLED(CONFIG_SHA512))
+ if (!IS_ENABLED(CONFIG_HAVE_DIGEST_SHA512))
return 0;
return digest_algo_register(&m512);
--
2.35.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2022-03-22 9:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 9:14 sha2 digest on ppc Barbier, Renaud
2022-03-22 8:07 ` Ahmad Fatoum
2022-03-22 9:00 ` Uwe Kleine-König [this message]
2022-03-28 10:03 ` [PATCH] crypto: Followup to crypto symbol renaming for algo registration Sascha Hauer
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=20220322090007.233155-1-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=Renaud.Barbier@ametek.com \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox