dlm: consistent ifdefs
PATCH 8/9 dlm: consistent ifdefs
Consistently handle the declarations of ifdef'ed debug functions in the two places they occur.
Signed-off-by David Teigland <[email protected]>
drivers/dlm/dlm_internal.h +0 -8
@@ -80,14 +80,6 @@ #define log_error(ls, fmt, args...) \ printk(KERN_ERR "dlm: %s: " fmt "\n", (ls)->ls_name , ##args) -#ifdef CONFIG_DLM_DEBUG -int dlm_create_debug_file (struct dlm_ls *ls); -void dlm_delete_debug_file (struct dlm_ls *ls); -#else -static inline int dlm_create_debug_file (struct dlm_ls *ls) {return 0 ; } -static inline void dlm_delete_debug_file (struct dlm_ls *ls) { } -#endif -#ifdef DLM_LOG_DEBUG #define log_debug(ls, fmt, args...) log_error(ls, fmt, ##args)#else
drivers/dlm/lockspace.c +8 -0
@@ -23,6 +23,14 @@#include "memory.h" #include "lock.h" +#ifdef CONFIG_DLM_DEBUG +int dlm_create_debug_file (struct dlm_ls *ls); +void dlm_delete_debug_file (struct dlm_ls *ls); +#else +static inline int dlm_create_debug_file (struct dlm_ls *ls) {return 0 ; } +static inline void dlm_delete_debug_file (struct dlm_ls *ls) { } +#endif +static int ls_count;static struct semaphore ls_lock;static struct list_head lslist;
drivers/dlm/main.c +2 -8
@@ -23,14 +23,8 @@int dlm_register_debugfs (void );void dlm_unregister_debugfs (void );#else -int dlm_register_debugfs (void ) -{ -return 0 ; -} - -void dlm_unregister_debugfs (void ) -{ -} +static inline int dlm_register_debugfs (void ) {return 0 ; } +static inline void dlm_unregister_debugfs (void ) { }#endif int dlm_node_ioctl_init (void );
--