summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2026-03-01 23:59:40 -0800
committerKeith Busch <kbusch@kernel.org>2026-03-27 07:35:00 -0700
commite57406c07b790005feaccc9f2bd75b827566e141 (patch)
treea759475e0a35a94c6dced47bd745299406670c52
parent9100a28c8bb4270744942cf834efcd80f1acda7d (diff)
nvme-auth: common: constify static data
Fully constify the dhgroup_map and hash_map arrays. Remove 'const' from individual fields, as it is now redundant. Acked-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Eric Biggers <ebiggers@kernel.org> Signed-off-by: Keith Busch <kbusch@kernel.org>
-rw-r--r--drivers/nvme/common/auth.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/nvme/common/auth.c b/drivers/nvme/common/auth.c
index 78d751481fe3..9e5cee217ff5 100644
--- a/drivers/nvme/common/auth.c
+++ b/drivers/nvme/common/auth.c
@@ -36,9 +36,9 @@ u32 nvme_auth_get_seqnum(void)
}
EXPORT_SYMBOL_GPL(nvme_auth_get_seqnum);
-static struct nvme_auth_dhgroup_map {
- const char name[16];
- const char kpp[16];
+static const struct nvme_auth_dhgroup_map {
+ char name[16];
+ char kpp[16];
} dhgroup_map[] = {
[NVME_AUTH_DHGROUP_NULL] = {
.name = "null", .kpp = "null" },
@@ -87,10 +87,10 @@ u8 nvme_auth_dhgroup_id(const char *dhgroup_name)
}
EXPORT_SYMBOL_GPL(nvme_auth_dhgroup_id);
-static struct nvme_dhchap_hash_map {
+static const struct nvme_dhchap_hash_map {
int len;
- const char hmac[15];
- const char digest[8];
+ char hmac[15];
+ char digest[8];
} hash_map[] = {
[NVME_AUTH_HASH_SHA256] = {
.len = 32,