Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1643713 > unrolled thread

[PATCH] ring-buffer: Remove unused function __rb_data_page_index()

Started byMatthias Kaehlcke <mka@chromium.org>
First post2017-05-18 02:20 +0200
Last post2017-05-18 21:50 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ring-buffer: Remove unused function __rb_data_page_index() Matthias Kaehlcke <mka@chromium.org> - 2017-05-18 02:20 +0200
    Re: [PATCH] ring-buffer: Remove unused function __rb_data_page_index() Doug Anderson <dianders@chromium.org> - 2017-05-18 21:50 +0200
      Re: [PATCH] ring-buffer: Remove unused function __rb_data_page_index() Doug Anderson <dianders@chromium.org> - 2017-05-18 21:50 +0200
      Re: [PATCH] ring-buffer: Remove unused function  __rb_data_page_index() Steven Rostedt <rostedt@goodmis.org> - 2017-05-18 21:50 +0200

#1643713 — [PATCH] ring-buffer: Remove unused function __rb_data_page_index()

FromMatthias Kaehlcke <mka@chromium.org>
Date2017-05-18 02:20 +0200
Subject[PATCH] ring-buffer: Remove unused function __rb_data_page_index()
Message-ID<tIhkB-1NU-9@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1644872

FromDoug Anderson <dianders@chromium.org>
Date2017-05-18 21:50 +0200
Message-ID<tIzAR-7Ri-1@gated-at.bofh.it>
In reply to#1643713
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>

[toc] | [prev] | [next] | [standalone]


#1644874

FromDoug Anderson <dianders@chromium.org>
Date2017-05-18 21:50 +0200
Message-ID<tIzAR-7Ri-11@gated-at.bofh.it>
In reply to#1644872
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

[toc] | [prev] | [next] | [standalone]


#1644876 — Re: [PATCH] ring-buffer: Remove unused function __rb_data_page_index()

FromSteven Rostedt <rostedt@goodmis.org>
Date2017-05-18 21:50 +0200
SubjectRe: [PATCH] ring-buffer: Remove unused function __rb_data_page_index()
Message-ID<tIzAR-7Ri-13@gated-at.bofh.it>
In reply to#1644872
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web