* [PATCH] ring-buffer: Remove unused function __rb_data_page_index()
@ 2017-05-18 0:14 Matthias Kaehlcke
2017-05-18 19:40 ` Doug Anderson
2017-12-04 12:05 ` Steven Rostedt
0 siblings, 2 replies; 5+ messages in thread
From: Matthias Kaehlcke @ 2017-05-18 0:14 UTC (permalink / raw)
To: Steven Rostedt, Ingo Molnar
Cc: linux-kernel, Douglas Anderson, Matthias Kaehlcke
This fixes the following warning when building with clang:
kernel/trace/ring_buffer.c:1842:1: error: unused function
'__rb_data_page_index' [-Werror,-Wunused-function]
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
kernel/trace/ring_buffer.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 4ae268e687fe..a6b87582c4ff 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1800,12 +1800,6 @@ void ring_buffer_change_overwrite(struct ring_buffer *buffer, int val)
}
EXPORT_SYMBOL_GPL(ring_buffer_change_overwrite);
-static __always_inline void *
-__rb_data_page_index(struct buffer_data_page *bpage, unsigned index)
-{
- return bpage->data + index;
-}
-
static __always_inline void *__rb_page_index(struct buffer_page *bpage, unsigned index)
{
return bpage->page->data + index;
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] ring-buffer: Remove unused function __rb_data_page_index()
2017-05-18 0:14 [PATCH] ring-buffer: Remove unused function __rb_data_page_index() Matthias Kaehlcke
@ 2017-05-18 19:40 ` Doug Anderson
2017-05-18 19:46 ` Steven Rostedt
2017-12-04 12:05 ` Steven Rostedt
1 sibling, 1 reply; 5+ messages in thread
From: Doug Anderson @ 2017-05-18 19:40 UTC (permalink / raw)
To: Matthias Kaehlcke
Cc: Steven Rostedt, Ingo Molnar, linux-kernel@vger.kernel.org
Hi,
This appears to have been introduced in 2009 by commit afbab76a62b6
("ring-buffer: have read page swap increment counter with page
entries"), which removed the user of the function but not the function
itself. If folks were so inclined, this could be picked back to
linux-stable, but I'm not sure it's worth it.
On Wed, May 17, 2017 at 5:14 PM, Matthias Kaehlcke <mka@chromium.org> wrote:
> This fixes the following warning when building with clang:
>
> kernel/trace/ring_buffer.c:1842:1: error: unused function
> '__rb_data_page_index' [-Werror,-Wunused-function]
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
> kernel/trace/ring_buffer.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index 4ae268e687fe..a6b87582c4ff 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -1800,12 +1800,6 @@ void ring_buffer_change_overwrite(struct ring_buffer *buffer, int val)
> }
> EXPORT_SYMBOL_GPL(ring_buffer_change_overwrite);
>
> -static __always_inline void *
> -__rb_data_page_index(struct buffer_data_page *bpage, unsigned index)
> -{
> - return bpage->data + index;
> -}
> -
> static __always_inline void *__rb_page_index(struct buffer_page *bpage, unsigned index)
> {
> return bpage->page->data + index;
FWIW:
Reviewed-by: Douglas Anderson <dianders@chromium.org>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] ring-buffer: Remove unused function __rb_data_page_index()
2017-05-18 19:40 ` Doug Anderson
@ 2017-05-18 19:46 ` Steven Rostedt
2017-05-18 19:48 ` Doug Anderson
0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2017-05-18 19:46 UTC (permalink / raw)
To: Doug Anderson
Cc: Matthias Kaehlcke, Ingo Molnar, linux-kernel@vger.kernel.org
On Thu, 18 May 2017 12:40:02 -0700
Doug Anderson <dianders@chromium.org> wrote:
> Hi,
>
> This appears to have been introduced in 2009 by commit afbab76a62b6
> ("ring-buffer: have read page swap increment counter with page
> entries"), which removed the user of the function but not the function
> itself. If folks were so inclined, this could be picked back to
> linux-stable, but I'm not sure it's worth it.
It doesn't do anything but waste some disk space in the source
repository. It's a static inline function, which means it's not created
unless something calls it.
Thus, not worth the stable churn.
-- Steve
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] ring-buffer: Remove unused function __rb_data_page_index()
2017-05-18 19:46 ` Steven Rostedt
@ 2017-05-18 19:48 ` Doug Anderson
0 siblings, 0 replies; 5+ messages in thread
From: Doug Anderson @ 2017-05-18 19:48 UTC (permalink / raw)
To: Steven Rostedt
Cc: Matthias Kaehlcke, Ingo Molnar, linux-kernel@vger.kernel.org
Hi,
On Thu, May 18, 2017 at 12:46 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Thu, 18 May 2017 12:40:02 -0700
> Doug Anderson <dianders@chromium.org> wrote:
>
>> Hi,
>>
>> This appears to have been introduced in 2009 by commit afbab76a62b6
>> ("ring-buffer: have read page swap increment counter with page
>> entries"), which removed the user of the function but not the function
>> itself. If folks were so inclined, this could be picked back to
>> linux-stable, but I'm not sure it's worth it.
>
> It doesn't do anything but waste some disk space in the source
> repository. It's a static inline function, which means it's not created
> unless something calls it.
>
> Thus, not worth the stable churn.
Yup, that's sane. I guess not much chance of someone trying to get
clang to run w/ no warnings by just picking stable patches. ;-)
-Doug
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ring-buffer: Remove unused function __rb_data_page_index()
2017-05-18 0:14 [PATCH] ring-buffer: Remove unused function __rb_data_page_index() Matthias Kaehlcke
2017-05-18 19:40 ` Doug Anderson
@ 2017-12-04 12:05 ` Steven Rostedt
1 sibling, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2017-12-04 12:05 UTC (permalink / raw)
To: Matthias Kaehlcke; +Cc: Ingo Molnar, linux-kernel, Douglas Anderson
On Wed, 17 May 2017 17:14:15 -0700
Matthias Kaehlcke <mka@chromium.org> wrote:
> This fixes the following warning when building with clang:
>
> kernel/trace/ring_buffer.c:1842:1: error: unused function
> '__rb_data_page_index' [-Werror,-Wunused-function]
Ug, I this patch somehow fell through. I'm applying it now.
-- Steve
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
> kernel/trace/ring_buffer.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
> index 4ae268e687fe..a6b87582c4ff 100644
> --- a/kernel/trace/ring_buffer.c
> +++ b/kernel/trace/ring_buffer.c
> @@ -1800,12 +1800,6 @@ void ring_buffer_change_overwrite(struct ring_buffer *buffer, int val)
> }
> EXPORT_SYMBOL_GPL(ring_buffer_change_overwrite);
>
> -static __always_inline void *
> -__rb_data_page_index(struct buffer_data_page *bpage, unsigned index)
> -{
> - return bpage->data + index;
> -}
> -
> static __always_inline void *__rb_page_index(struct buffer_page *bpage, unsigned index)
> {
> return bpage->page->data + index;
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-04 12:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18 0:14 [PATCH] ring-buffer: Remove unused function __rb_data_page_index() Matthias Kaehlcke
2017-05-18 19:40 ` Doug Anderson
2017-05-18 19:46 ` Steven Rostedt
2017-05-18 19:48 ` Doug Anderson
2017-12-04 12:05 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox