ocfs2/net: Silence build warnings
PATCH 1/3 ocfs2/net: Silence build warnings
This patch silences the build warnings concerning o2net_debugfs_init() and friends when building without CONFIG_DEBUG_FS enabled.
Signed-off-by Sunil Mushran <[email protected]>
--- fs/ocfs2/cluster/tcp.h | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
fs/ocfs2/cluster/tcp.h +6 -6
@@ -128,23 +128,23 @@ 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 ) +static inline int o2net_debugfs_init (void ) {return 0 ; } -static void o2net_debugfs_exit (void ) +static inline void o2net_debugfs_exit (void ) { } -static void o2net_debug_add_nst (struct o2net_send_tracking *nst) +static inline void o2net_debug_add_nst (struct o2net_send_tracking *nst) { } -static void o2net_debug_del_nst (struct o2net_send_tracking *nst) +static inline void o2net_debug_del_nst (struct o2net_send_tracking *nst) { } -static void o2net_debug_add_sc (struct o2net_sock_container *sc) +static inline void o2net_debug_add_sc (struct o2net_sock_container *sc) { } -static void o2net_debug_del_sc (struct o2net_sock_container *sc) +static inline void o2net_debug_del_sc (struct o2net_sock_container *sc) { }#endif /* CONFIG_DEBUG_FS */
Signature · 1 line
1.5.3.6
PATCH 2/3 ocfs2/dlm: Silence build warnings
This patch silences the build warnings concerning dlm_debug_init() and friends when building without CONFIG_DEBUG_FS enabled.
Signed-off-by Sunil Mushran <[email protected]>
--- fs/ocfs2/dlm/dlmdebug.h | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
fs/ocfs2/dlm/dlmdebug.h +6 -6
@@ -60,25 +60,25 @@ void dlm_destroy_debugfs_root(void);#else -static int dlm_debug_init (struct dlm_ctxt *dlm) +static inline int dlm_debug_init (struct dlm_ctxt *dlm) {return 0 ; } -static void dlm_debug_shutdown (struct dlm_ctxt *dlm) +static inline void dlm_debug_shutdown (struct dlm_ctxt *dlm) { } -static int dlm_create_debugfs_subroot (struct dlm_ctxt *dlm) +static inline int dlm_create_debugfs_subroot (struct dlm_ctxt *dlm) {return 0 ; } -static void dlm_destroy_debugfs_subroot (struct dlm_ctxt *dlm) +static inline void dlm_destroy_debugfs_subroot (struct dlm_ctxt *dlm) { } -static int dlm_create_debugfs_root (void ) +static inline int dlm_create_debugfs_root (void ) {return 0 ; } -static void dlm_destroy_debugfs_root (void ) +static inline void dlm_destroy_debugfs_root (void ) { }
Signature · 1 line
1.5.3.6
PATCH 3/3 ocfs2/net: Silence build warnings
In reply to Sunil MushranThis patch silences the build warnings concerning o2net_init_nst() and friends when building without CONFIG_DEBUG_FS enabled.
Signed-off-by Sunil Mushran <[email protected]>
--- fs/ocfs2/cluster/tcp.c | 28 +++++++++------------------- fs/ocfs2/cluster/tcp_internal.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 19 deletions(-)
fs/ocfs2/cluster/tcp.c +9 -19
@@ -142,53 +142,43 @@ static void o2net_idle_timer(unsigned long data);static void o2net_sc_postpone_idle (struct o2net_sock_container *sc);static void o2net_sc_reset_idle_timer (struct o2net_sock_container *sc); -static void o2net_init_nst (struct o2net_send_tracking *nst,u32 msgtype, -u32 msgkey,struct task_struct *task,u8 node) -{#ifdef CONFIG_DEBUG_FS +void o2net_init_nst (struct o2net_send_tracking *nst,u32 msgtype, +u32 msgkey,struct task_struct *task,u8 node) +{INIT_LIST_HEAD (&nst->st_net_debug_item); nst->st_task = task; nst->st_msg_type = msgtype; nst->st_msg_key = msgkey; nst->st_node = node; -#endif } -static void o2net_set_nst_sock_time (struct o2net_send_tracking *nst) +void o2net_set_nst_sock_time (struct o2net_send_tracking *nst) { -#ifdef CONFIG_DEBUG_FS do_gettimeofday (&nst->st_sock_time); -#endif } -static void o2net_set_nst_send_time (struct o2net_send_tracking *nst) +void o2net_set_nst_send_time (struct o2net_send_tracking *nst) { -#ifdef CONFIG_DEBUG_FS do_gettimeofday (&nst->st_send_time); -#endif } -static void o2net_set_nst_status_time (struct o2net_send_tracking *nst) +void o2net_set_nst_status_time (struct o2net_send_tracking *nst) { -#ifdef CONFIG_DEBUG_FS do_gettimeofday (&nst->st_status_time); -#endif } -static void o2net_set_nst_sock_container (struct o2net_send_tracking *nst, +void o2net_set_nst_sock_container (struct o2net_send_tracking *nst,struct o2net_sock_container *sc) { -#ifdef CONFIG_DEBUG_FS nst->st_sc = sc; -#endif } -static void o2net_set_nst_msg_id (struct o2net_send_tracking *nst,u32 msg_id) +void o2net_set_nst_msg_id (struct o2net_send_tracking *nst,u32 msg_id) { -#ifdef CONFIG_DEBUG_FS nst->st_id = msg_id; -#endif } +#endif /* CONFIG_DEBUG_FS */ static inline int o2net_reconnect_delay (void ) {
fs/ocfs2/cluster/tcp_internal.h +32 -0
@@ -224,10 +224,42 @@ struct o2net_send_tracking {struct timeval st_send_time;struct timeval st_status_time; }; + +void o2net_init_nst (struct o2net_send_tracking *nst,u32 msgtype, +u32 msgkey,struct task_struct *task,u8 node); +void o2net_set_nst_sock_time (struct o2net_send_tracking *nst); +void o2net_set_nst_send_time (struct o2net_send_tracking *nst); +void o2net_set_nst_status_time (struct o2net_send_tracking *nst); +void o2net_set_nst_sock_container (struct o2net_send_tracking *nst, +struct o2net_sock_container *sc); +void o2net_set_nst_msg_id (struct o2net_send_tracking *nst,u32 msg_id); +#else struct o2net_send_tracking {u32 dummy; }; + +static inline void o2net_init_nst (struct o2net_send_tracking *nst,u32 msgtype, +u32 msgkey,struct task_struct *task,u8 node) +{ +} +static inline void o2net_set_nst_sock_time (struct o2net_send_tracking *nst) +{ +} +static inline void o2net_set_nst_send_time (struct o2net_send_tracking *nst) +{ +} +static inline void o2net_set_nst_status_time (struct o2net_send_tracking *nst) +{ +} +static inline void o2net_set_nst_sock_container (struct o2net_send_tracking *nst, +struct o2net_sock_container *sc) +{ +} +static inline void o2net_set_nst_msg_id (struct o2net_send_tracking *nst, +u32 msg_id) +{ +}#endif /* CONFIG_DEBUG_FS */ #endif /* O2CLUSTER_TCP_INTERNAL_H */
Signature · 1 line
1.5.3.6