public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 8/9] dlm: consistent ifdefs
@ 2005-06-02  8:03 David Teigland
  0 siblings, 0 replies; only message in thread
From: David Teigland @ 2005-06-02  8:03 UTC (permalink / raw)
  To: akpm, linux-kernel

[-- Attachment #1: debug-ifdefs.patch --]
[-- Type: text/plain, Size: 2164 bytes --]

Consistently handle the declarations of ifdef'ed debug functions in the
two places they occur.

Signed-off-by: David Teigland <teigland@redhat.com>

Index: linux/drivers/dlm/dlm_internal.h
===================================================================
--- linux.orig/drivers/dlm/dlm_internal.h	2005-06-02 13:04:51.696074128 +0800
+++ linux/drivers/dlm/dlm_internal.h	2005-06-02 13:11:20.554958592 +0800
@@ -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
Index: linux/drivers/dlm/lockspace.c
===================================================================
--- linux.orig/drivers/dlm/lockspace.c	2005-06-02 12:55:58.290164152 +0800
+++ linux/drivers/dlm/lockspace.c	2005-06-02 13:12:01.091796056 +0800
@@ -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;
Index: linux/drivers/dlm/main.c
===================================================================
--- linux.orig/drivers/dlm/main.c	2005-06-02 12:43:52.480503992 +0800
+++ linux/drivers/dlm/main.c	2005-06-02 13:12:43.582336512 +0800
@@ -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);

--


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-02  8:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-02  8:03 [patch 8/9] dlm: consistent ifdefs David Teigland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox