debugfs.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * DebugFS interface for the NVMe target.
  4. * Copyright (c) 2022-2024 Shadow
  5. * Copyright (c) 2024 SUSE LLC
  6. */
  7. #ifndef NVMET_DEBUGFS_H
  8. #define NVMET_DEBUGFS_H
  9. #include <linux/types.h>
  10. #ifdef CONFIG_NVME_TARGET_DEBUGFS
  11. int nvmet_debugfs_subsys_setup(struct nvmet_subsys *subsys);
  12. void nvmet_debugfs_subsys_free(struct nvmet_subsys *subsys);
  13. int nvmet_debugfs_ctrl_setup(struct nvmet_ctrl *ctrl);
  14. void nvmet_debugfs_ctrl_free(struct nvmet_ctrl *ctrl);
  15. int __init nvmet_init_debugfs(void);
  16. void nvmet_exit_debugfs(void);
  17. #else
  18. static inline int nvmet_debugfs_subsys_setup(struct nvmet_subsys *subsys)
  19. {
  20. return 0;
  21. }
  22. static inline void nvmet_debugfs_subsys_free(struct nvmet_subsys *subsys){}
  23. static inline int nvmet_debugfs_ctrl_setup(struct nvmet_ctrl *ctrl)
  24. {
  25. return 0;
  26. }
  27. static inline void nvmet_debugfs_ctrl_free(struct nvmet_ctrl *ctrl) {}
  28. static inline int __init nvmet_init_debugfs(void)
  29. {
  30. return 0;
  31. }
  32. static inline void nvmet_exit_debugfs(void) {}
  33. #endif
  34. #endif /* NVMET_DEBUGFS_H */