Skip to content

Commit

Permalink
ftrace: warning in kernel/trace/ftrace.c
Browse files Browse the repository at this point in the history
this warning:

  kernel/trace/ftrace.c:189: warning: ‘frozen_record_count’ defined but not used

triggers because frozen_record_count is only used in the KCONFIG_MARKERS
case. Move the variable it there.

Alas, this frozen-record facility seems to have little use. The
frozen_record_count variable is not used by anything, nor the flags.

So this section might need a bit of dead-code-removal care as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Oct 24, 2008
1 parent 66b0de3 commit f17845e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ enum {

static int ftrace_filtered;
static int tracing_on;
static int frozen_record_count;

static LIST_HEAD(ftrace_new_addrs);

Expand All @@ -211,6 +210,9 @@ static struct dyn_ftrace *ftrace_free_records;


#ifdef CONFIG_KPROBES

static int frozen_record_count;

static inline void freeze_record(struct dyn_ftrace *rec)
{
if (!(rec->flags & FTRACE_FL_FROZEN)) {
Expand Down Expand Up @@ -1443,3 +1445,4 @@ ftrace_enable_sysctl(struct ctl_table *table, int write,
mutex_unlock(&ftrace_sysctl_lock);
return ret;
}

0 comments on commit f17845e

Please sign in to comment.