Skip to content

Commit 58f7e4d

Browse files
zzjianhuirostedt
authored andcommitted
ring-buffer: Remove unused function ring_buffer_nr_pages()
Because ring_buffer_nr_pages() is not an inline function and user accesses buffer->buffers[cpu]->nr_pages directly, the function ring_buffer_nr_pages is removed. Signed-off-by: Jianhui Zhou <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent bcf86c0 commit 58f7e4d

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

include/linux/ring_buffer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ void ring_buffer_set_clock(struct trace_buffer *buffer,
193193
void ring_buffer_set_time_stamp_abs(struct trace_buffer *buffer, bool abs);
194194
bool ring_buffer_time_stamp_abs(struct trace_buffer *buffer);
195195

196-
size_t ring_buffer_nr_pages(struct trace_buffer *buffer, int cpu);
197196
size_t ring_buffer_nr_dirty_pages(struct trace_buffer *buffer, int cpu);
198197

199198
struct buffer_data_read_page;

kernel/trace/ring_buffer.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -692,18 +692,6 @@ u64 ring_buffer_event_time_stamp(struct trace_buffer *buffer,
692692
return ts;
693693
}
694694

695-
/**
696-
* ring_buffer_nr_pages - get the number of buffer pages in the ring buffer
697-
* @buffer: The ring_buffer to get the number of pages from
698-
* @cpu: The cpu of the ring_buffer to get the number of pages from
699-
*
700-
* Returns the number of pages used by a per_cpu buffer of the ring buffer.
701-
*/
702-
size_t ring_buffer_nr_pages(struct trace_buffer *buffer, int cpu)
703-
{
704-
return buffer->buffers[cpu]->nr_pages;
705-
}
706-
707695
/**
708696
* ring_buffer_nr_dirty_pages - get the number of used pages in the ring buffer
709697
* @buffer: The ring_buffer to get the number of pages from

0 commit comments

Comments
 (0)