mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 21:54:11 +08:00
d27e84a305
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Philipp Reisner <philipp.reisner@linbit.com> Cc: Lars Ellenberg <lars.ellenberg@linbit.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: drbd-dev@lists.linbit.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
41 lines
1.6 KiB
C
41 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#include <linux/kernel.h>
|
|
#include <linux/module.h>
|
|
#include <linux/debugfs.h>
|
|
|
|
#include "drbd_int.h"
|
|
|
|
#ifdef CONFIG_DEBUG_FS
|
|
void __init drbd_debugfs_init(void);
|
|
void drbd_debugfs_cleanup(void);
|
|
|
|
void drbd_debugfs_resource_add(struct drbd_resource *resource);
|
|
void drbd_debugfs_resource_cleanup(struct drbd_resource *resource);
|
|
|
|
void drbd_debugfs_connection_add(struct drbd_connection *connection);
|
|
void drbd_debugfs_connection_cleanup(struct drbd_connection *connection);
|
|
|
|
void drbd_debugfs_device_add(struct drbd_device *device);
|
|
void drbd_debugfs_device_cleanup(struct drbd_device *device);
|
|
|
|
void drbd_debugfs_peer_device_add(struct drbd_peer_device *peer_device);
|
|
void drbd_debugfs_peer_device_cleanup(struct drbd_peer_device *peer_device);
|
|
#else
|
|
|
|
static inline void __init drbd_debugfs_init(void) { }
|
|
static inline void drbd_debugfs_cleanup(void) { }
|
|
|
|
static inline void drbd_debugfs_resource_add(struct drbd_resource *resource) { }
|
|
static inline void drbd_debugfs_resource_cleanup(struct drbd_resource *resource) { }
|
|
|
|
static inline void drbd_debugfs_connection_add(struct drbd_connection *connection) { }
|
|
static inline void drbd_debugfs_connection_cleanup(struct drbd_connection *connection) { }
|
|
|
|
static inline void drbd_debugfs_device_add(struct drbd_device *device) { }
|
|
static inline void drbd_debugfs_device_cleanup(struct drbd_device *device) { }
|
|
|
|
static inline void drbd_debugfs_peer_device_add(struct drbd_peer_device *peer_device) { }
|
|
static inline void drbd_debugfs_peer_device_cleanup(struct drbd_peer_device *peer_device) { }
|
|
|
|
#endif
|