From: Eric Biggers Date: Mon, 2 Mar 2026 07:59:40 +0000 (-0800) Subject: nvme-auth: common: constify static data X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e57406c07b790005feaccc9f2bd75b827566e141;p=thirdparty%2Fkernel%2Flinux.git 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 Acked-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Eric Biggers Signed-off-by: Keith Busch --- diff --git a/drivers/nvme/common/auth.c b/drivers/nvme/common/auth.c index 78d751481fe31..9e5cee217ff5c 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,