Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Eric Biggers and committed by
Keith Busch
e57406c0 9100a28c

+6 -6
+6 -6
drivers/nvme/common/auth.c
··· 36 36 } 37 37 EXPORT_SYMBOL_GPL(nvme_auth_get_seqnum); 38 38 39 - static struct nvme_auth_dhgroup_map { 40 - const char name[16]; 41 - const char kpp[16]; 39 + static const struct nvme_auth_dhgroup_map { 40 + char name[16]; 41 + char kpp[16]; 42 42 } dhgroup_map[] = { 43 43 [NVME_AUTH_DHGROUP_NULL] = { 44 44 .name = "null", .kpp = "null" }, ··· 87 87 } 88 88 EXPORT_SYMBOL_GPL(nvme_auth_dhgroup_id); 89 89 90 - static struct nvme_dhchap_hash_map { 90 + static const struct nvme_dhchap_hash_map { 91 91 int len; 92 - const char hmac[15]; 93 - const char digest[8]; 92 + char hmac[15]; 93 + char digest[8]; 94 94 } hash_map[] = { 95 95 [NVME_AUTH_HASH_SHA256] = { 96 96 .len = 32,