* [PATCH 1/2] fs/ocfs2/cluster: compilation warning fix
@ 2008-05-11 17:08 Leonardo Potenza
2008-05-12 21:50 ` Mark Fasheh
2008-05-12 21:54 ` Joel Becker
0 siblings, 2 replies; 3+ messages in thread
From: Leonardo Potenza @ 2008-05-11 17:08 UTC (permalink / raw)
To: kernel-janitors; +Cc: mfasheh, joel.becker, linux-kernel
From: Leonardo Potenza <lpotenza@inwind.it>
Removed the warning messages:
fs/ocfs2/cluster/tcp.h:132: warning: 'o2net_debugfs_init' defined but not used
fs/ocfs2/cluster/tcp.h:136: warning: 'o2net_debugfs_exit' defined but not used
fs/ocfs2/cluster/tcp.h:139: warning: 'o2net_debug_add_nst' defined but not used
fs/ocfs2/cluster/tcp.h:142: warning: 'o2net_debug_del_nst' defined but not used
fs/ocfs2/cluster/tcp.h:145: warning: 'o2net_debug_add_sc' defined but not used
fs/ocfs2/cluster/tcp.h:148: warning: 'o2net_debug_del_sc' defined but not used
If not in debug build (CONFIG_DEBUG_FS), the definition of those functions
has been moved from 'tcp.h' to 'netdebug.c'.
Signed-off-by: Leonardo Potenza <lpotenza@inwind.it>
---
netdebug.c | 31 +++++++++++++++++++++++++++++--
tcp.h | 22 ----------------------
2 files changed, 29 insertions(+), 24 deletions(-)
Index: linux-2.6/fs/ocfs2/cluster/netdebug.c
=================================--- linux-2.6.orig/fs/ocfs2/cluster/netdebug.c
+++ linux-2.6/fs/ocfs2/cluster/netdebug.c
@@ -24,8 +24,6 @@
*
*/
-#ifdef CONFIG_DEBUG_FS
-
#include <linux/module.h>
#include <linux/types.h>
#include <linux/slab.h>
@@ -43,6 +41,8 @@
#include "tcp_internal.h"
+#ifdef CONFIG_DEBUG_FS
+
#define O2NET_DEBUG_DIR "o2net"
#define SC_DEBUG_NAME "sock_containers"
#define NST_DEBUG_NAME "send_tracking"
@@ -438,4 +438,31 @@ void o2net_debugfs_exit(void)
debugfs_remove(o2net_dentry);
}
+#else
+
+int o2net_debugfs_init(void)
+{
+ return 0;
+}
+
+void o2net_debugfs_exit(void)
+{
+}
+
+void o2net_debug_add_nst(struct o2net_send_tracking *nst)
+{
+}
+
+void o2net_debug_del_nst(struct o2net_send_tracking *nst)
+{
+}
+
+void o2net_debug_add_sc(struct o2net_sock_container *sc)
+{
+}
+
+void o2net_debug_del_sc(struct o2net_sock_container *sc)
+{
+}
+
#endif /* CONFIG_DEBUG_FS */
Index: linux-2.6/fs/ocfs2/cluster/tcp.h
=================================--- linux-2.6.orig/fs/ocfs2/cluster/tcp.h
+++ linux-2.6/fs/ocfs2/cluster/tcp.h
@@ -120,33 +120,11 @@ void o2net_exit(void);
struct o2net_send_tracking;
struct o2net_sock_container;
-#ifdef CONFIG_DEBUG_FS
int o2net_debugfs_init(void);
void o2net_debugfs_exit(void);
void o2net_debug_add_nst(struct o2net_send_tracking *nst);
void o2net_debug_del_nst(struct o2net_send_tracking *nst);
void o2net_debug_add_sc(struct o2net_sock_container *sc);
void o2net_debug_del_sc(struct o2net_sock_container *sc);
-#else
-static int o2net_debugfs_init(void)
-{
- return 0;
-}
-static void o2net_debugfs_exit(void)
-{
-}
-static void o2net_debug_add_nst(struct o2net_send_tracking *nst)
-{
-}
-static void o2net_debug_del_nst(struct o2net_send_tracking *nst)
-{
-}
-static void o2net_debug_add_sc(struct o2net_sock_container *sc)
-{
-}
-static void o2net_debug_del_sc(struct o2net_sock_container *sc)
-{
-}
-#endif /* CONFIG_DEBUG_FS */
#endif /* O2CLUSTER_TCP_H */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] fs/ocfs2/cluster: compilation warning fix
2008-05-11 17:08 [PATCH 1/2] fs/ocfs2/cluster: compilation warning fix Leonardo Potenza
@ 2008-05-12 21:50 ` Mark Fasheh
2008-05-12 21:54 ` Joel Becker
1 sibling, 0 replies; 3+ messages in thread
From: Mark Fasheh @ 2008-05-12 21:50 UTC (permalink / raw)
To: Leonardo Potenza; +Cc: kernel-janitors, joel.becker, linux-kernel
On Sun, May 11, 2008 at 07:08:05PM +0200, Leonardo Potenza wrote:
> From: Leonardo Potenza <lpotenza@inwind.it>
>
> Removed the warning messages:
> fs/ocfs2/cluster/tcp.h:132: warning: 'o2net_debugfs_init' defined but not used
> fs/ocfs2/cluster/tcp.h:136: warning: 'o2net_debugfs_exit' defined but not used
> fs/ocfs2/cluster/tcp.h:139: warning: 'o2net_debug_add_nst' defined but not used
> fs/ocfs2/cluster/tcp.h:142: warning: 'o2net_debug_del_nst' defined but not used
> fs/ocfs2/cluster/tcp.h:145: warning: 'o2net_debug_add_sc' defined but not used
> fs/ocfs2/cluster/tcp.h:148: warning: 'o2net_debug_del_sc' defined but not used
>
> If not in debug build (CONFIG_DEBUG_FS), the definition of those functions
> has been moved from 'tcp.h' to 'netdebug.c'.
Ok, both of your patches look good for Ocfs2.git. Thanks.
--Mark
--
Mark Fasheh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] fs/ocfs2/cluster: compilation warning fix
2008-05-11 17:08 [PATCH 1/2] fs/ocfs2/cluster: compilation warning fix Leonardo Potenza
2008-05-12 21:50 ` Mark Fasheh
@ 2008-05-12 21:54 ` Joel Becker
1 sibling, 0 replies; 3+ messages in thread
From: Joel Becker @ 2008-05-12 21:54 UTC (permalink / raw)
To: Leonardo Potenza; +Cc: kernel-janitors, mfasheh, linux-kernel, sunil.mushran
On Sun, May 11, 2008 at 07:08:05PM +0200, Leonardo Potenza wrote:
> From: Leonardo Potenza <lpotenza@inwind.it>
>
> Removed the warning messages:
> fs/ocfs2/cluster/tcp.h:132: warning: 'o2net_debugfs_init' defined but not used
> fs/ocfs2/cluster/tcp.h:136: warning: 'o2net_debugfs_exit' defined but not used
> fs/ocfs2/cluster/tcp.h:139: warning: 'o2net_debug_add_nst' defined but not used
> fs/ocfs2/cluster/tcp.h:142: warning: 'o2net_debug_del_nst' defined but not used
> fs/ocfs2/cluster/tcp.h:145: warning: 'o2net_debug_add_sc' defined but not used
> fs/ocfs2/cluster/tcp.h:148: warning: 'o2net_debug_del_sc' defined but not used
>
> If not in debug build (CONFIG_DEBUG_FS), the definition of those functions
> has been moved from 'tcp.h' to 'netdebug.c'.
They should stay in tcp.h but be static inline. That's the
problem.
Joel
--
"Too much walking shoes worn thin.
Too much trippin' and my soul's worn thin.
Time to catch a ride it leaves today
Her name is what it means.
Too much walking shoes worn thin."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-12 21:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-11 17:08 [PATCH 1/2] fs/ocfs2/cluster: compilation warning fix Leonardo Potenza
2008-05-12 21:50 ` Mark Fasheh
2008-05-12 21:54 ` Joel Becker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).