From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 10641D58E7D for ; Mon, 2 Mar 2026 08:01:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+L0Em8YZzz3oeAjsqhEEaWVnAiSxk6EVkcwH31tWiug=; b=TVx/mpnmSJTAXgHb5NhsnPl+zq 029g9aWfPDFWoUF44qWTWs67VoOJVAS9B/+0ZTyw+xEjgdaXEx7p75etjyTHbtob2Kqr/b3B+n8dr 3qwUgqMEjq6xQ7U6oc1FKvM21BWWoY6ex7holNb2M59e8xbvhJw7fiGpZdennBqn0CcGBgivJxmNF qyGW44QWuyvbzGUYNzBdHha4GE18Dbl0p5gv4Cvieu8/BWueXuFMeq1mWPlVWSKasA9e6bVqesbGj Ny07hBM4NrmjDMubvvcIhNLdXM8awBL7s2PmFULZ7GQXd1m3+639y0efuZquwTecOOJd3ozfTkt+Y Sa8gFlhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vwyDf-0000000CSsx-1Q1z; Mon, 02 Mar 2026 08:01:35 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vwyDZ-0000000CSgH-1GSx for linux-nvme@lists.infradead.org; Mon, 02 Mar 2026 08:01:29 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id A6F72600AE; Mon, 2 Mar 2026 08:01:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06729C2BCAF; Mon, 2 Mar 2026 08:01:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772438488; bh=Omn4aX96GTToOSEoh8ejKEWlhlIaPsxh0SUDDsoG/yE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qjSrsvUOYvJaUvrNXFV40bkKpL0BPzLNIlJv0uVsi/n0f5MjlkUoV/MgbMdUrn5z/ ZWzhuVJOG/BcEL9GbUYKtVuzY89wCG7FHQN9D99lKxCvO85gK4uoQaZv6pBbHrS9dA hva4WY2cB6FpPdZzDn4vkvjIbZocUpXQmyxheHbTRjs3QDQ9UiaDHWOdO15L7DJ5se mpVdPlGd6Aji3v7NYe3rFZcx7ln48oPobvJOQm9UerIl2v0OhqgMjAWl3Ba6qfbrUh Sa+nuks4h3CznBzHLB8u6wK0qTyyhMdPPu1idfa2tR5du69SkydNEMgb6MMCn7ybWQ oau3iep3Jm3KA== From: Eric Biggers To: linux-nvme@lists.infradead.org, Chaitanya Kulkarni , Sagi Grimberg , Christoph Hellwig , Hannes Reinecke Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Ard Biesheuvel , "Jason A . Donenfeld" , Herbert Xu , Eric Biggers Subject: [PATCH 19/21] nvme-auth: common: remove nvme_auth_digest_name() Date: Sun, 1 Mar 2026 23:59:57 -0800 Message-ID: <20260302075959.338638-20-ebiggers@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260302075959.338638-1-ebiggers@kernel.org> References: <20260302075959.338638-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org Since nvme_auth_digest_name() is no longer used, remove it and the associated data from the hash_map array. Signed-off-by: Eric Biggers --- drivers/nvme/common/auth.c | 12 ------------ include/linux/nvme-auth.h | 1 - 2 files changed, 13 deletions(-) diff --git a/drivers/nvme/common/auth.c b/drivers/nvme/common/auth.c index 5be86629c2d41..2d325fb930836 100644 --- a/drivers/nvme/common/auth.c +++ b/drivers/nvme/common/auth.c @@ -87,26 +87,22 @@ u8 nvme_auth_dhgroup_id(const char *dhgroup_name) 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", }, }; const char *nvme_auth_hmac_name(u8 hmac_id) { @@ -114,18 +110,10 @@ const char *nvme_auth_hmac_name(u8 hmac_id) return NULL; return hash_map[hmac_id].hmac; } 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; if (!hmac_name || !strlen(hmac_name)) diff --git a/include/linux/nvme-auth.h b/include/linux/nvme-auth.h index 940d0703eb1df..184a1f9510fad 100644 --- a/include/linux/nvme-auth.h +++ b/include/linux/nvme-auth.h @@ -19,11 +19,10 @@ u32 nvme_auth_get_seqnum(void); const char *nvme_auth_dhgroup_name(u8 dhgroup_id); 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 { u8 hmac_id; union { -- 2.53.0