[PATCH 3/3] nvme-auth: unexport negotiate and wait functions

Chaitanya Kulkarni kch at nvidia.com
Wed Feb 7 22:24:27 PST 2024


Now that post connect functionality is moved from host/fabrics.c to
host/auth.c we don't need nvme_auth_wait() and nvme_auth_negotiate() to
be exported from nvme authentication code, unexport them to make it
private.

Signed-off-by: Chaitanya Kulkarni <kch at nvidia.com>
---
 drivers/nvme/host/auth.c |  6 ++----
 drivers/nvme/host/nvme.h | 10 ----------
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
index 159071462738..2fa8c4ee50ed 100644
--- a/drivers/nvme/host/auth.c
+++ b/drivers/nvme/host/auth.c
@@ -852,7 +852,7 @@ static void nvme_queue_auth_work(struct work_struct *work)
 		chap->error = ret;
 }
 
-int nvme_auth_negotiate(struct nvme_ctrl *ctrl, int qid)
+static int nvme_auth_negotiate(struct nvme_ctrl *ctrl, int qid)
 {
 	struct nvme_dhchap_queue_context *chap;
 
@@ -871,9 +871,8 @@ int nvme_auth_negotiate(struct nvme_ctrl *ctrl, int qid)
 	queue_work(nvme_auth_wq, &chap->auth_work);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(nvme_auth_negotiate);
 
-int nvme_auth_wait(struct nvme_ctrl *ctrl, int qid)
+static int nvme_auth_wait(struct nvme_ctrl *ctrl, int qid)
 {
 	struct nvme_dhchap_queue_context *chap;
 	int ret;
@@ -885,7 +884,6 @@ int nvme_auth_wait(struct nvme_ctrl *ctrl, int qid)
 	nvme_auth_reset_dhchap(chap);
 	return ret;
 }
-EXPORT_SYMBOL_GPL(nvme_auth_wait);
 
 static void nvme_ctrl_auth_work(struct work_struct *work)
 {
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index bb1c9b74aa55..a4d13ed8f6c3 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -1082,8 +1082,6 @@ int __init nvme_init_auth(void);
 void __exit nvme_exit_auth(void);
 int nvme_auth_init_ctrl(struct nvme_ctrl *ctrl);
 void nvme_auth_stop(struct nvme_ctrl *ctrl);
-int nvme_auth_negotiate(struct nvme_ctrl *ctrl, int qid);
-int nvme_auth_wait(struct nvme_ctrl *ctrl, int qid);
 void nvme_auth_free(struct nvme_ctrl *ctrl);
 u16 nvme_auth_post_connect(struct nvme_ctrl *ctrl, u16 qid, u32 result);
 #else
@@ -1099,14 +1097,6 @@ static inline void __exit nvme_exit_auth(void)
 {
 }
 static inline void nvme_auth_stop(struct nvme_ctrl *ctrl) {};
-static inline int nvme_auth_negotiate(struct nvme_ctrl *ctrl, int qid)
-{
-	return -EPROTONOSUPPORT;
-}
-static inline int nvme_auth_wait(struct nvme_ctrl *ctrl, int qid)
-{
-	return NVME_SC_AUTH_REQUIRED;
-}
 static inline void nvme_auth_free(struct nvme_ctrl *ctrl) {};
 static inline u16 nvme_auth_post_connect(struct nvme_ctrl *ctrl, u16 qid,
 		u32 result)
-- 
2.40.0




More information about the Linux-nvme mailing list