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


Groups > linux.kernel > #1644872

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

From Doug Anderson <dianders@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH] ring-buffer: Remove unused function __rb_data_page_index()
Date 2017-05-18 21:50 +0200
Message-ID <tIzAR-7Ri-1@gated-at.bofh.it> (permalink)
References <tIhkB-1NU-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[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

csiph-web