aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2026-06-20 17:44:27 +0000
committerWarner Losh <imp@FreeBSD.org>2026-06-20 17:46:37 +0000
commit64b805d52eec795c6436def24cec508404b5bfdc (patch)
tree7745cc778d7021a7dd1421db2c6b39e35d75007b
parentf70a687bb071cdee60dc7420d75fa1dd122af51a (diff)
nvme: Move default is_storage method to nvme_private.h
Since CODE entries wind up in the nvme_if.c file, we got warnings when it wasn't used (which is always). Move it into nvme_private and change its name to nvme_is_storage_default to put it into the nvme_ namespace. Fixes: 949804c81909 Sponsored by: Netflix
-rw-r--r--sys/dev/nvme/nvme_if.m10
-rw-r--r--sys/dev/nvme/nvme_private.h6
2 files changed, 7 insertions, 9 deletions
diff --git a/sys/dev/nvme/nvme_if.m b/sys/dev/nvme/nvme_if.m
index 9705aeb7ce0b..4484c1da9dce 100644
--- a/sys/dev/nvme/nvme_if.m
+++ b/sys/dev/nvme/nvme_if.m
@@ -12,14 +12,6 @@ HEADER {
#include "dev/nvme/nvme_private.h"
};
-CODE {
- static bool
- default_is_storage_device(device_t dev)
- {
- return (true);
- }
-}
-
#
# A new namespace is now available
#
@@ -67,4 +59,4 @@ METHOD int handle_aen {
#
METHOD bool is_storage_device {
device_t dev;
-} default default_is_storage_device;
+} default nvme_is_storage_device_default;
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h
index f5918a04be72..ec941f31779c 100644
--- a/sys/dev/nvme/nvme_private.h
+++ b/sys/dev/nvme/nvme_private.h
@@ -591,4 +591,10 @@ void nvme_ctrlr_poll(struct nvme_controller *ctrlr);
int nvme_ctrlr_suspend(struct nvme_controller *ctrlr);
int nvme_ctrlr_resume(struct nvme_controller *ctrlr);
+static inline bool
+nvme_is_storage_device_default(device_t dev)
+{
+ return (true);
+}
+
#endif /* __NVME_PRIVATE_H__ */