Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [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

* Re: [PATCH] nvme-auth: fix compilation warning when CONFIG_NVME_AUTH is not set
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2022-11-15 16:10 UTC (permalink / raw)
  To: Sagi Grimberg
  Cc: linux-nvme, Christoph Hellwig, Keith Busch, Chaitanya Kulkarni,
	Hannes Reinecke

On Tue, Nov 15, 2022 at 04:35:32PM +0200, Sagi Grimberg wrote:
> init/exit functions should be empty static inline stubs when
> CONFIG_NVME_AUTH is not set.

I've folded this and another similar fix in.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvme-auth: fix compilation warning when CONFIG_NVME_AUTH is not set
  2022-11-15 16:10 ` Christoph Hellwig
@ 2022-11-15 17:16   ` Sagi Grimberg
  0 siblings, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2022-11-15 17:16 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-nvme, Keith Busch, Chaitanya Kulkarni, Hannes Reinecke

> On Tue, Nov 15, 2022 at 04:35:32PM +0200, Sagi Grimberg wrote:
>> init/exit functions should be empty static inline stubs when
>> CONFIG_NVME_AUTH is not set.
> 
> I've folded this and another similar fix in.

Thanks


^ permalink raw reply	[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