Skip to content

Commit a47b53e

Browse files
committed
tracing: Rename tracing_reset() to tracing_reset_cpu()
The name tracing_reset() was a misnomer, as it really only reset a single CPU buffer. Rename it to tracing_reset_cpu() and also make it static and remove the prototype from trace.h, as it is only used in a single function. Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 58fe7a8 commit a47b53e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

kernel/trace/trace.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,7 +1854,7 @@ int __init register_tracer(struct tracer *type)
18541854
return ret;
18551855
}
18561856

1857-
void tracing_reset(struct trace_buffer *buf, int cpu)
1857+
static void tracing_reset_cpu(struct trace_buffer *buf, int cpu)
18581858
{
18591859
struct ring_buffer *buffer = buf->buffer;
18601860

@@ -4251,7 +4251,7 @@ static int tracing_open(struct inode *inode, struct file *file)
42514251
if (cpu == RING_BUFFER_ALL_CPUS)
42524252
tracing_reset_online_cpus(trace_buf);
42534253
else
4254-
tracing_reset(trace_buf, cpu);
4254+
tracing_reset_cpu(trace_buf, cpu);
42554255
}
42564256

42574257
if (file->f_mode & FMODE_READ) {
@@ -6742,7 +6742,7 @@ tracing_snapshot_write(struct file *filp, const char __user *ubuf, size_t cnt,
67426742
if (iter->cpu_file == RING_BUFFER_ALL_CPUS)
67436743
tracing_reset_online_cpus(&tr->max_buffer);
67446744
else
6745-
tracing_reset(&tr->max_buffer, iter->cpu_file);
6745+
tracing_reset_cpu(&tr->max_buffer, iter->cpu_file);
67466746
}
67476747
break;
67486748
}

kernel/trace/trace.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,6 @@ trace_buffer_iter(struct trace_iterator *iter, int cpu)
677677

678678
int tracer_init(struct tracer *t, struct trace_array *tr);
679679
int tracing_is_enabled(void);
680-
void tracing_reset(struct trace_buffer *buf, int cpu);
681680
void tracing_reset_online_cpus(struct trace_buffer *buf);
682681
void tracing_reset_current(int cpu);
683682
void tracing_reset_all_online_cpus(void);

0 commit comments

Comments
 (0)