* [PATCH] ring-buffer: remove obsolete rb_event_is_commit()
@ 2020-11-17 5:37 Lukas Bulwahn
2020-11-17 16:19 ` Nathan Chancellor
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Bulwahn @ 2020-11-17 5:37 UTC (permalink / raw)
To: Steven Rostedt, Ingo Molnar
Cc: Arnd Bergmann, Tom Rix, Nathan Chancellor, Nick Desaulniers,
clang-built-linux, kernel-janitors, linux-kernel, Lukas Bulwahn
Commit a389d86f7fd0 ("ring-buffer: Have nested events still record running
time stamp") removed the only uses of rb_event_is_commit() in
rb_update_event() and rb_update_write_stamp().
Hence, since then, make CC=clang W=1 warns:
kernel/trace/ring_buffer.c:2763:1:
warning: unused function 'rb_event_is_commit' [-Wunused-function]
Remove this obsolete function.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
applies cleanly on current master and next-20201116
Steven, please pick this minor non-urgent clean-up patch.
kernel/trace/ring_buffer.c | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index ab68f28b8f4b..799d790ab365 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2629,9 +2629,6 @@ rb_add_time_stamp(struct ring_buffer_event *event, u64 delta, bool abs)
return skip_time_extend(event);
}
-static inline bool rb_event_is_commit(struct ring_buffer_per_cpu *cpu_buffer,
- struct ring_buffer_event *event);
-
#ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
static inline bool sched_clock_stable(void)
{
@@ -2759,20 +2756,6 @@ static unsigned rb_calculate_event_length(unsigned length)
return length;
}
-static __always_inline bool
-rb_event_is_commit(struct ring_buffer_per_cpu *cpu_buffer,
- struct ring_buffer_event *event)
-{
- unsigned long addr = (unsigned long)event;
- unsigned long index;
-
- index = rb_event_index(event);
- addr &= PAGE_MASK;
-
- return cpu_buffer->commit_page->page == (void *)addr &&
- rb_commit_index(cpu_buffer) == index;
-}
-
static u64 rb_time_delta(struct ring_buffer_event *event)
{
switch (event->type_len) {
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ring-buffer: remove obsolete rb_event_is_commit()
2020-11-17 5:37 [PATCH] ring-buffer: remove obsolete rb_event_is_commit() Lukas Bulwahn
@ 2020-11-17 16:19 ` Nathan Chancellor
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Chancellor @ 2020-11-17 16:19 UTC (permalink / raw)
To: Lukas Bulwahn
Cc: Steven Rostedt, Ingo Molnar, Arnd Bergmann, Tom Rix,
Nick Desaulniers, clang-built-linux, kernel-janitors,
linux-kernel
On Tue, Nov 17, 2020 at 06:37:03AM +0100, Lukas Bulwahn wrote:
> Commit a389d86f7fd0 ("ring-buffer: Have nested events still record running
> time stamp") removed the only uses of rb_event_is_commit() in
> rb_update_event() and rb_update_write_stamp().
>
> Hence, since then, make CC=clang W=1 warns:
>
> kernel/trace/ring_buffer.c:2763:1:
> warning: unused function 'rb_event_is_commit' [-Wunused-function]
>
> Remove this obsolete function.
>
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
> ---
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-17 16:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 5:37 [PATCH] ring-buffer: remove obsolete rb_event_is_commit() Lukas Bulwahn
2020-11-17 16:19 ` Nathan Chancellor
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).