mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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>
This commit is contained in:
committed by
Keith Busch
parent
9100a28c8b
commit
e57406c07b
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user