From: "Hernán Gonzalez" <hernan@vanguardiasur.com.ar>
To: herbert@gondor.apana.org.au, davem@davemloft.net,
hernan@vanguardiasur.com.ar, steven.lin1@broadcom.com,
arvind.yadav.cs@gmail.com, colin.king@canonical.com,
raveendra.padasalagi@broadcom.com, ray.jui@broadcom.com,
scott.branden@broadcom.com, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] crypto: bcm: Constify *hash_alg_name[]
Date: Tue, 27 Feb 2018 19:01:27 -0300 [thread overview]
Message-ID: <1519768888-19866-3-git-send-email-hernan@vanguardiasur.com.ar> (raw)
In-Reply-To: <1519768888-19866-1-git-send-email-hernan@vanguardiasur.com.ar>
Note: This is compile only tested.
No gain from this except some self-documenting.
Signed-off-by: Hernán Gonzalez <hernan@vanguardiasur.com.ar>
---
drivers/crypto/bcm/spu.c | 5 +++--
drivers/crypto/bcm/spu.h | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/bcm/spu.c b/drivers/crypto/bcm/spu.c
index efaf3cf..c7bb79e 100644
--- a/drivers/crypto/bcm/spu.c
+++ b/drivers/crypto/bcm/spu.c
@@ -23,8 +23,9 @@
#include "cipher.h"
/* This array is based on the hash algo type supported in spu.h */
-char *hash_alg_name[] = { "None", "md5", "sha1", "sha224", "sha256", "aes",
- "sha384", "sha512", "sha3_224", "sha3_256", "sha3_384", "sha3_512" };
+char const * const hash_alg_name[] = { "None", "md5", "sha1", "sha224",
+ "sha256", "aes", "sha384", "sha512", "sha3_224", "sha3_256", "sha3_384",
+ "sha3_512" };
/* Assumes SPU-M messages are in big endian */
void spum_dump_msg_hdr(u8 *buf, unsigned int buf_len)
diff --git a/drivers/crypto/bcm/spu.h b/drivers/crypto/bcm/spu.h
index f252367..71cf6b5 100644
--- a/drivers/crypto/bcm/spu.h
+++ b/drivers/crypto/bcm/spu.h
@@ -111,7 +111,7 @@ enum aead_type {
AEAD_TYPE_LAST
};
-extern char *hash_alg_name[HASH_ALG_LAST];
+extern const char * const hash_alg_name[HASH_ALG_LAST];
struct spu_request_opts {
bool is_inbound;
--
2.7.4
next prev parent reply other threads:[~2018-02-27 22:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 22:01 [PATCH 1/4] crypto: bcm: Remove unused variable (char *tag_to_hash_idx[]) Hernán Gonzalez
2018-02-27 22:01 ` [PATCH 2/4] crypto: bcm: Move *aead_alg_name[] from spu.c to util.c. Constify too Hernán Gonzalez
2018-02-27 22:01 ` Hernán Gonzalez [this message]
2018-03-09 14:29 ` [PATCH 3/4] crypto: bcm: Constify *hash_alg_name[] Herbert Xu
2018-03-09 14:35 ` Joe Perches
2018-03-09 15:04 ` Herbert Xu
2018-03-09 15:04 ` Kamil Konieczny
2018-02-27 22:01 ` [PATCH 4/4] crypto: bcm: Constify variables in spu2.c Hernán Gonzalez
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=1519768888-19866-3-git-send-email-hernan@vanguardiasur.com.ar \
--to=hernan@vanguardiasur.com.ar \
--cc=arvind.yadav.cs@gmail.com \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=raveendra.padasalagi@broadcom.com \
--cc=ray.jui@broadcom.com \
--cc=scott.branden@broadcom.com \
--cc=steven.lin1@broadcom.com \
/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.