]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
nvme-auth: common: constify static data
authorEric Biggers <ebiggers@kernel.org>
Mon, 2 Mar 2026 07:59:40 +0000 (23:59 -0800)
committerKeith Busch <kbusch@kernel.org>
Fri, 27 Mar 2026 14:35:00 +0000 (07:35 -0700)
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>
drivers/nvme/common/auth.c

index 78d751481fe31c4845eb05dce41c2f4edfc1d29f..9e5cee217ff5c93e1737c7cd977f63cda90f3b5d 100644 (file)
@@ -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,