projects/linux·blob master · refs

47 lines · 1.2 KiB

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
10#include <linux/types.h>
11
12#ifdef CONFIG_NVME_TARGET_DEBUGFS
13int nvmet_debugfs_subsys_setup(struct nvmet_subsys *subsys);
14void nvmet_debugfs_subsys_free(struct nvmet_subsys *subsys);
15int nvmet_debugfs_ctrl_setup(struct nvmet_ctrl *ctrl);
16void nvmet_debugfs_ctrl_free(struct nvmet_ctrl *ctrl);
17void nvmet_debugfs_ns_setup(struct nvmet_ns *ns);
18void nvmet_debugfs_ns_free(struct nvmet_ns *ns);
19
20int __init nvmet_init_debugfs(void);
21void nvmet_exit_debugfs(void);
22#else
23static inline int nvmet_debugfs_subsys_setup(struct nvmet_subsys *subsys)
24{
25 return 0;
26}
27static inline void nvmet_debugfs_subsys_free(struct nvmet_subsys *subsys){}
28
29static inline int nvmet_debugfs_ctrl_setup(struct nvmet_ctrl *ctrl)
30{
31 return 0;
32}
33static inline void nvmet_debugfs_ctrl_free(struct nvmet_ctrl *ctrl) {}
34
35static inline void nvmet_debugfs_ns_setup(struct nvmet_ns *ns) {}
36static inline void nvmet_debugfs_ns_free(struct nvmet_ns *ns) {}
37
38static inline int __init nvmet_init_debugfs(void)
39{
40 return 0;
41}
42
43static inline void nvmet_exit_debugfs(void) {}
44
45#endif
46
47#endif /* NVMET_DEBUGFS_H */