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

index 5be86629c2d411d1c3040bc9fb8858231117750d..2d325fb93083661b64afee15aca0cbeba4f0f379 100644 (file)
@@ -89,22 +89,18 @@ EXPORT_SYMBOL_GPL(nvme_auth_dhgroup_id);
 static const struct nvme_dhchap_hash_map {
        int len;
        char hmac[15];
-       char digest[8];
 } hash_map[] = {
        [NVME_AUTH_HASH_SHA256] = {
                .len = 32,
                .hmac = "hmac(sha256)",
-               .digest = "sha256",
        },
        [NVME_AUTH_HASH_SHA384] = {
                .len = 48,
                .hmac = "hmac(sha384)",
-               .digest = "sha384",
        },
        [NVME_AUTH_HASH_SHA512] = {
                .len = 64,
                .hmac = "hmac(sha512)",
-               .digest = "sha512",
        },
 };
 
@@ -116,14 +112,6 @@ const char *nvme_auth_hmac_name(u8 hmac_id)
 }
 EXPORT_SYMBOL_GPL(nvme_auth_hmac_name);
 
-const char *nvme_auth_digest_name(u8 hmac_id)
-{
-       if (hmac_id >= ARRAY_SIZE(hash_map))
-               return NULL;
-       return hash_map[hmac_id].digest;
-}
-EXPORT_SYMBOL_GPL(nvme_auth_digest_name);
-
 u8 nvme_auth_hmac_id(const char *hmac_name)
 {
        int i;
index 940d0703eb1dfb72524032a32c06086d79a6f99e..184a1f9510fad851dacd32412f1dc06b2386dbf4 100644 (file)
@@ -21,7 +21,6 @@ const char *nvme_auth_dhgroup_kpp(u8 dhgroup_id);
 u8 nvme_auth_dhgroup_id(const char *dhgroup_name);
 
 const char *nvme_auth_hmac_name(u8 hmac_id);
-const char *nvme_auth_digest_name(u8 hmac_id);
 size_t nvme_auth_hmac_hash_len(u8 hmac_id);
 u8 nvme_auth_hmac_id(const char *hmac_name);
 struct nvme_auth_hmac_ctx {