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.
Unified · Split
| @@ -1854,7 +1854,7 @@ int __init register_tracer(struct tracer *type) · 1853 unmodified lines | ||
| 1854 | 1854 | return ret; |
| 1855 | 1855 | } |
| 1856 | 1856 | |
| 1857 | −void tracing_reset(struct trace_buffer *buf, int cpu) | |
| 1857 | +static void tracing_reset_cpu(struct trace_buffer *buf, int cpu) | |
| 1858 | 1858 | { |
| 1859 | 1859 | struct ring_buffer *buffer = buf->buffer; |
| 1860 | 1860 | |
| @@ -4251,7 +4251,7 @@ static int tracing_open(struct inode *inode, struct file *file) · 2390 unmodified lines | ||
| 4251 | 4251 | if (cpu == RING_BUFFER_ALL_CPUS) |
| 4252 | 4252 | tracing_reset_online_cpus(trace_buf); |
| 4253 | 4253 | else |
| 4254 | − tracing_reset(trace_buf, cpu); | |
| 4254 | + tracing_reset_cpu(trace_buf, cpu); | |
| 4255 | 4255 | } |
| 4256 | 4256 | |
| 4257 | 4257 | if (file->f_mode & FMODE_READ) { |
| @@ -6742,7 +6742,7 @@ tracing_snapshot_write(struct file *filp, const char __user *ubuf, size_t cnt, · 2484 unmodified lines | ||
| 6742 | 6742 | if (iter->cpu_file == RING_BUFFER_ALL_CPUS) |
| 6743 | 6743 | tracing_reset_online_cpus(&tr->max_buffer); |
| 6744 | 6744 | else |
| 6745 | − tracing_reset(&tr->max_buffer, iter->cpu_file); | |
| 6745 | + tracing_reset_cpu(&tr->max_buffer, iter->cpu_file); | |
| 6746 | 6746 | } |
| 6747 | 6747 | break; |
| 6748 | 6748 | } |
| @@ -677,7 +677,6 @@ trace_buffer_iter(struct trace_iterator *iter, int cpu) · 676 unmodified lines | ||
| 677 | 677 | |
| 678 | 678 | int tracer_init(struct tracer *t, struct trace_array *tr); |
| 679 | 679 | int tracing_is_enabled(void); |
| 680 | −void tracing_reset(struct trace_buffer *buf, int cpu); | |
| 681 | 680 | void tracing_reset_online_cpus(struct trace_buffer *buf); |
| 682 | 681 | void tracing_reset_current(int cpu); |
| 683 | 682 | void tracing_reset_all_online_cpus(void); |