* [Ocfs2-devel] [PATCH] fs, ocfs2: Move o2net_get_func_run_time under CONFIG_OCFS2_FS_STATS.
@ 2011-03-18 11:01 Rakib Mullick
2011-03-18 18:31 ` Mark Fasheh
2011-03-26 22:48 ` Joel Becker
0 siblings, 2 replies; 3+ messages in thread
From: Rakib Mullick @ 2011-03-18 11:01 UTC (permalink / raw)
To: LKML, ocfs2-devel; +Cc: Andrew Morton, Mark Fasheh, Joel Becker, Sunil Mushran
When CONFIG_DEBUG_FS=y and CONFIG_OCFS2_FS_STATS=n, we get the
following warning:
fs/ocfs2/cluster/tcp.c:213:16: warning: ?o2net_get_func_run_time?
defined but not used
Since o2net_get_func_run_time is only called from
o2net_update_recv_stats, so move it under CONFIG_OCFS2_FS_STATS.
Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
---
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index 3b11cb1..ee04ff5 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -210,10 +210,6 @@ static inline void
o2net_set_func_stop_time(struct o2net_sock_container *sc)
sc->sc_tv_func_stop = ktime_get();
}
-static ktime_t o2net_get_func_run_time(struct o2net_sock_container *sc)
-{
- return ktime_sub(sc->sc_tv_func_stop, sc->sc_tv_func_start);
-}
#else /* CONFIG_DEBUG_FS */
# define o2net_init_nst(a, b, c, d, e)
# define o2net_set_nst_sock_time(a)
@@ -227,10 +223,14 @@ static ktime_t o2net_get_func_run_time(struct
o2net_sock_container *sc)
# define o2net_set_advance_stop_time(a)
# define o2net_set_func_start_time(a)
# define o2net_set_func_stop_time(a)
-# define o2net_get_func_run_time(a) (ktime_t)0
#endif /* CONFIG_DEBUG_FS */
#ifdef CONFIG_OCFS2_FS_STATS
+static ktime_t o2net_get_func_run_time(struct o2net_sock_container *sc)
+{
+ return ktime_sub(sc->sc_tv_func_stop, sc->sc_tv_func_start);
+}
+
static void o2net_update_send_stats(struct o2net_send_tracking *nst,
struct o2net_sock_container *sc)
{
^ permalink raw reply related [flat|nested] 3+ messages in thread* [Ocfs2-devel] [PATCH] fs, ocfs2: Move o2net_get_func_run_time under CONFIG_OCFS2_FS_STATS.
2011-03-18 11:01 [Ocfs2-devel] [PATCH] fs, ocfs2: Move o2net_get_func_run_time under CONFIG_OCFS2_FS_STATS Rakib Mullick
@ 2011-03-18 18:31 ` Mark Fasheh
2011-03-26 22:48 ` Joel Becker
1 sibling, 0 replies; 3+ messages in thread
From: Mark Fasheh @ 2011-03-18 18:31 UTC (permalink / raw)
To: Rakib Mullick
Cc: LKML, ocfs2-devel, Andrew Morton, Joel Becker, Sunil Mushran
On Fri, Mar 18, 2011 at 05:01:08PM +0600, Rakib Mullick wrote:
> When CONFIG_DEBUG_FS=y and CONFIG_OCFS2_FS_STATS=n, we get the
> following warning:
>
> fs/ocfs2/cluster/tcp.c:213:16: warning: ?o2net_get_func_run_time?
> defined but not used
>
> Since o2net_get_func_run_time is only called from
> o2net_update_recv_stats, so move it under CONFIG_OCFS2_FS_STATS.
>
> Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Looks reasonable to me, thanks.
--Mark
--
Mark Fasheh
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Ocfs2-devel] [PATCH] fs, ocfs2: Move o2net_get_func_run_time under CONFIG_OCFS2_FS_STATS.
2011-03-18 11:01 [Ocfs2-devel] [PATCH] fs, ocfs2: Move o2net_get_func_run_time under CONFIG_OCFS2_FS_STATS Rakib Mullick
2011-03-18 18:31 ` Mark Fasheh
@ 2011-03-26 22:48 ` Joel Becker
1 sibling, 0 replies; 3+ messages in thread
From: Joel Becker @ 2011-03-26 22:48 UTC (permalink / raw)
To: Rakib Mullick
Cc: LKML, ocfs2-devel, Andrew Morton, Mark Fasheh, Sunil Mushran
On Fri, Mar 18, 2011 at 05:01:08PM +0600, Rakib Mullick wrote:
> When CONFIG_DEBUG_FS=y and CONFIG_OCFS2_FS_STATS=n, we get the
> following warning:
>
> fs/ocfs2/cluster/tcp.c:213:16: warning: ?o2net_get_func_run_time?
> defined but not used
>
> Since o2net_get_func_run_time is only called from
> o2net_update_recv_stats, so move it under CONFIG_OCFS2_FS_STATS.
>
> Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
This patch is now in the merge-window branch of ocfs2.git.
Joel
--
"Here's a nickle -- get yourself a better X server."
- Keith Packard
http://www.jlbec.org/
jlbec at evilplan.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-26 22:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-18 11:01 [Ocfs2-devel] [PATCH] fs, ocfs2: Move o2net_get_func_run_time under CONFIG_OCFS2_FS_STATS Rakib Mullick
2011-03-18 18:31 ` Mark Fasheh
2011-03-26 22:48 ` 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).