^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #include <linux/debugfs.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #include "drbd_int.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #ifdef CONFIG_DEBUG_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) void __init drbd_debugfs_init(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) void drbd_debugfs_cleanup(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) void drbd_debugfs_resource_add(struct drbd_resource *resource);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) void drbd_debugfs_resource_cleanup(struct drbd_resource *resource);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) void drbd_debugfs_connection_add(struct drbd_connection *connection);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) void drbd_debugfs_connection_cleanup(struct drbd_connection *connection);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) void drbd_debugfs_device_add(struct drbd_device *device);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) void drbd_debugfs_device_cleanup(struct drbd_device *device);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) void drbd_debugfs_peer_device_add(struct drbd_peer_device *peer_device);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) void drbd_debugfs_peer_device_cleanup(struct drbd_peer_device *peer_device);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) static inline void __init drbd_debugfs_init(void) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) static inline void drbd_debugfs_cleanup(void) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) static inline void drbd_debugfs_resource_add(struct drbd_resource *resource) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) static inline void drbd_debugfs_resource_cleanup(struct drbd_resource *resource) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) static inline void drbd_debugfs_connection_add(struct drbd_connection *connection) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) static inline void drbd_debugfs_connection_cleanup(struct drbd_connection *connection) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) static inline void drbd_debugfs_device_add(struct drbd_device *device) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) static inline void drbd_debugfs_device_cleanup(struct drbd_device *device) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) static inline void drbd_debugfs_peer_device_add(struct drbd_peer_device *peer_device) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) static inline void drbd_debugfs_peer_device_cleanup(struct drbd_peer_device *peer_device) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) #endif