All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [patch 8/9] dlm: consistent ifdefs
Date: Thu, 2 Jun 2005 16:03:20 +0800	[thread overview]
Message-ID: <20050602080320.GH21570@redhat.com> (raw)

[-- 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);

--


                 reply	other threads:[~2005-06-02  8:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050602080320.GH21570@redhat.com \
    --to=teigland@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.