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: remove nvme_auth_digest_name()

Since nvme_auth_digest_name() is no longer used, remove it and the
associated data from the hash_map array.

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
844d950b 16977e77

-13
-12
drivers/nvme/common/auth.c
··· 89 89 static const struct nvme_dhchap_hash_map { 90 90 int len; 91 91 char hmac[15]; 92 - char digest[8]; 93 92 } hash_map[] = { 94 93 [NVME_AUTH_HASH_SHA256] = { 95 94 .len = 32, 96 95 .hmac = "hmac(sha256)", 97 - .digest = "sha256", 98 96 }, 99 97 [NVME_AUTH_HASH_SHA384] = { 100 98 .len = 48, 101 99 .hmac = "hmac(sha384)", 102 - .digest = "sha384", 103 100 }, 104 101 [NVME_AUTH_HASH_SHA512] = { 105 102 .len = 64, 106 103 .hmac = "hmac(sha512)", 107 - .digest = "sha512", 108 104 }, 109 105 }; 110 106 ··· 111 115 return hash_map[hmac_id].hmac; 112 116 } 113 117 EXPORT_SYMBOL_GPL(nvme_auth_hmac_name); 114 - 115 - const char *nvme_auth_digest_name(u8 hmac_id) 116 - { 117 - if (hmac_id >= ARRAY_SIZE(hash_map)) 118 - return NULL; 119 - return hash_map[hmac_id].digest; 120 - } 121 - EXPORT_SYMBOL_GPL(nvme_auth_digest_name); 122 118 123 119 u8 nvme_auth_hmac_id(const char *hmac_name) 124 120 {
-1
include/linux/nvme-auth.h
··· 21 21 u8 nvme_auth_dhgroup_id(const char *dhgroup_name); 22 22 23 23 const char *nvme_auth_hmac_name(u8 hmac_id); 24 - const char *nvme_auth_digest_name(u8 hmac_id); 25 24 size_t nvme_auth_hmac_hash_len(u8 hmac_id); 26 25 u8 nvme_auth_hmac_id(const char *hmac_name); 27 26 struct nvme_auth_hmac_ctx {