* [PATCH] nvme-auth: fix compilation warning when CONFIG_NVME_AUTH is not set
@ 2022-11-15 14:35 Sagi Grimberg
2022-11-15 16:10 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Sagi Grimberg @ 2022-11-15 14:35 UTC (permalink / raw)
To: linux-nvme
Cc: Christoph Hellwig, Keith Busch, Chaitanya Kulkarni,
Hannes Reinecke
init/exit functions should be empty static inline stubs when
CONFIG_NVME_AUTH is not set.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
---
drivers/nvme/host/nvme.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 357fa7330bd9..a50b0743728e 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -1058,11 +1058,11 @@ 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);
#else
-int __init nvme_init_auth(void)
+static inline int nvme_init_auth(void)
{
return 0;
}
-void __exit nvme_exit_auth(void) {};
+static inline void nvme_exit_auth(void) {};
static inline void nvme_auth_init_ctrl(struct nvme_ctrl *ctrl) {};
static inline void nvme_auth_stop(struct nvme_ctrl *ctrl) {};
static inline int nvme_auth_negotiate(struct nvme_ctrl *ctrl, int qid)
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-15 17:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-15 14:35 [PATCH] nvme-auth: fix compilation warning when CONFIG_NVME_AUTH is not set Sagi Grimberg
2022-11-15 16:10 ` Christoph Hellwig
2022-11-15 17:16 ` Sagi Grimberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox