linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ring-buffer: Remove unused function ring_buffer_page_len()
@ 2018-12-28 13:38 Miroslav Benes
  2018-12-28 23:33 ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Miroslav Benes @ 2018-12-28 13:38 UTC (permalink / raw)
  To: rostedt, mingo; +Cc: tom.zanussi, mhiramat, linux-kernel, Miroslav Benes

Commit 6b7e633fe9c2 ("tracing: Remove extra zeroing out of the ring
buffer page") removed the only caller of ring_buffer_page_len(). The
function is now unused and may be removed.

Signed-off-by: Miroslav Benes <mbenes@suse.cz>
---
I am sorry if you received the patch more than once (hopefully not). For some
strange reasons git send-email segfaulted, I tried to send from a different
machine and made a mistake. Holiday mode *sigh*.

 include/linux/ring_buffer.h |  3 ---
 kernel/trace/ring_buffer.c  | 14 --------------
 2 files changed, 17 deletions(-)

diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h
index 0940fda59872..2351aa46dbc7 100644
--- a/include/linux/ring_buffer.h
+++ b/include/linux/ring_buffer.h
@@ -187,9 +187,6 @@ void ring_buffer_set_clock(struct ring_buffer *buffer,
 void ring_buffer_set_time_stamp_abs(struct ring_buffer *buffer, bool abs);
 bool ring_buffer_time_stamp_abs(struct ring_buffer *buffer);
 
-size_t ring_buffer_page_len(void *page);
-
-
 void *ring_buffer_alloc_read_page(struct ring_buffer *buffer, int cpu);
 void ring_buffer_free_read_page(struct ring_buffer *buffer, int cpu, void *data);
 int ring_buffer_read_page(struct ring_buffer *buffer, void **data_page,
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 4f3247a53259..ca1308eec4a4 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -353,20 +353,6 @@ static void rb_init_page(struct buffer_data_page *bpage)
 	local_set(&bpage->commit, 0);
 }
 
-/**
- * ring_buffer_page_len - the size of data on the page.
- * @page: The page to read
- *
- * Returns the amount of data on the page, including buffer page header.
- */
-size_t ring_buffer_page_len(void *page)
-{
-	struct buffer_data_page *bpage = page;
-
-	return (local_read(&bpage->commit) & ~RB_MISSED_FLAGS)
-		+ BUF_PAGE_HDR_SIZE;
-}
-
 /*
  * Also stolen from mm/slob.c. Thanks to Mathieu Desnoyers for pointing
  * this issue out.
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ring-buffer: Remove unused function ring_buffer_page_len()
  2018-12-28 13:38 [PATCH] ring-buffer: Remove unused function ring_buffer_page_len() Miroslav Benes
@ 2018-12-28 23:33 ` Steven Rostedt
  2019-02-06 16:24   ` Miroslav Benes
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2018-12-28 23:33 UTC (permalink / raw)
  To: Miroslav Benes; +Cc: mingo, tom.zanussi, mhiramat, linux-kernel

On Fri, 28 Dec 2018 14:38:47 +0100
Miroslav Benes <mbenes@suse.cz> wrote:

> Commit 6b7e633fe9c2 ("tracing: Remove extra zeroing out of the ring
> buffer page") removed the only caller of ring_buffer_page_len(). The
> function is now unused and may be removed.
> 
> Signed-off-by: Miroslav Benes <mbenes@suse.cz>
> ---
> I am sorry if you received the patch more than once (hopefully not). For some
> strange reasons git send-email segfaulted, I tried to send from a different
> machine and made a mistake. Holiday mode *sigh*.
> 
>

No worries. I'm also in holiday mode. I marked the patch in my INBOX
and hopefully when I'm back to work it's not buried and lost for months.

Even if it is, I periodically purge my INBOX where I find missing
patches like these ;-)

So if it's not applied in a couple of weeks, just ping me about it.

-- Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ring-buffer: Remove unused function ring_buffer_page_len()
  2018-12-28 23:33 ` Steven Rostedt
@ 2019-02-06 16:24   ` Miroslav Benes
  2019-02-06 16:54     ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Miroslav Benes @ 2019-02-06 16:24 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: mingo, tom.zanussi, mhiramat, linux-kernel

On Fri, 28 Dec 2018, Steven Rostedt wrote:

> On Fri, 28 Dec 2018 14:38:47 +0100
> Miroslav Benes <mbenes@suse.cz> wrote:
> 
> > Commit 6b7e633fe9c2 ("tracing: Remove extra zeroing out of the ring
> > buffer page") removed the only caller of ring_buffer_page_len(). The
> > function is now unused and may be removed.
> > 
> > Signed-off-by: Miroslav Benes <mbenes@suse.cz>
> > ---
> > I am sorry if you received the patch more than once (hopefully not). For some
> > strange reasons git send-email segfaulted, I tried to send from a different
> > machine and made a mistake. Holiday mode *sigh*.
> > 
> >
> 
> No worries. I'm also in holiday mode. I marked the patch in my INBOX
> and hopefully when I'm back to work it's not buried and lost for months.
> 
> Even if it is, I periodically purge my INBOX where I find missing
> patches like these ;-)
> 
> So if it's not applied in a couple of weeks, just ping me about it.

Gentle ping...

Miroslav

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ring-buffer: Remove unused function ring_buffer_page_len()
  2019-02-06 16:24   ` Miroslav Benes
@ 2019-02-06 16:54     ` Steven Rostedt
  2019-02-06 16:59       ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2019-02-06 16:54 UTC (permalink / raw)
  To: Miroslav Benes; +Cc: mingo, tom.zanussi, mhiramat, linux-kernel

On Wed, 6 Feb 2019 17:24:45 +0100 (CET)
Miroslav Benes <mbenes@suse.cz> wrote:


> > No worries. I'm also in holiday mode. I marked the patch in my INBOX
> > and hopefully when I'm back to work it's not buried and lost for months.
> > 
> > Even if it is, I periodically purge my INBOX where I find missing
> > patches like these ;-)
> > 
> > So if it's not applied in a couple of weeks, just ping me about it.  
> 
> Gentle ping...

Thanks for the reminder. My INBOX blew up again, and this was lost in
the noise once more.

I'll take a look at it today.

-- Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ring-buffer: Remove unused function ring_buffer_page_len()
  2019-02-06 16:54     ` Steven Rostedt
@ 2019-02-06 16:59       ` Steven Rostedt
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2019-02-06 16:59 UTC (permalink / raw)
  To: Miroslav Benes; +Cc: mingo, tom.zanussi, mhiramat, linux-kernel

On Wed, 6 Feb 2019 11:54:20 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Wed, 6 Feb 2019 17:24:45 +0100 (CET)
> Miroslav Benes <mbenes@suse.cz> wrote:
> 
> 
> > > No worries. I'm also in holiday mode. I marked the patch in my INBOX
> > > and hopefully when I'm back to work it's not buried and lost for months.
> > > 
> > > Even if it is, I periodically purge my INBOX where I find missing
> > > patches like these ;-)
> > > 
> > > So if it's not applied in a couple of weeks, just ping me about it.    
> > 
> > Gentle ping...  
> 
> Thanks for the reminder. My INBOX blew up again, and this was lost in
> the noise once more.
> 
> I'll take a look at it today.
>

I applied it to my local tree, which you'll probably see in linux-next
sometime next week, and pushed for the next merge window.

Thanks!

-- Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-02-06 16:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-28 13:38 [PATCH] ring-buffer: Remove unused function ring_buffer_page_len() Miroslav Benes
2018-12-28 23:33 ` Steven Rostedt
2019-02-06 16:24   ` Miroslav Benes
2019-02-06 16:54     ` Steven Rostedt
2019-02-06 16:59       ` Steven Rostedt

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).