linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf/core: Move the inline keyword at the beginning of function declaration
@ 2018-03-08 20:28 Mathieu Malaterre
  2018-06-22  7:22 ` Mathieu Malaterre
  2018-06-22  9:12 ` [tip:perf/urgent] perf/core: Move the inline keyword at the beginning of the " tip-bot for Mathieu Malaterre
  0 siblings, 2 replies; 3+ messages in thread
From: Mathieu Malaterre @ 2018-03-08 20:28 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: trival, Mathieu Malaterre, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim, linux-kernel

The inline keyword was not at the beginning of the function declaration.
Fix the following warning (reported at W=1)

  CC      kernel/events/ring_buffer.o
kernel/events/ring_buffer.c:105:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
 static bool __always_inline
 ^~~~~~
kernel/events/ring_buffer.c:116:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
 static int __always_inline
 ^~~~~~
kernel/events/ring_buffer.c:416:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
 static bool __always_inline rb_need_aux_wakeup(struct ring_buffer *rb)
 ^~~~~~
  AR      kernel/events/built-in.o

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 kernel/events/ring_buffer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index 6c6b3c48db71..03e39e3df543 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -102,7 +102,7 @@ static void perf_output_put_handle(struct perf_output_handle *handle)
 	preempt_enable();
 }
 
-static bool __always_inline
+static __always_inline bool
 ring_buffer_has_space(unsigned long head, unsigned long tail,
 		      unsigned long data_size, unsigned int size,
 		      bool backward)
@@ -113,7 +113,7 @@ ring_buffer_has_space(unsigned long head, unsigned long tail,
 		return CIRC_SPACE(tail, head, data_size) >= size;
 }
 
-static int __always_inline
+static __always_inline int
 __perf_output_begin(struct perf_output_handle *handle,
 		    struct perf_event *event, unsigned int size,
 		    bool backward)
@@ -413,7 +413,7 @@ void *perf_aux_output_begin(struct perf_output_handle *handle,
 }
 EXPORT_SYMBOL_GPL(perf_aux_output_begin);
 
-static bool __always_inline rb_need_aux_wakeup(struct ring_buffer *rb)
+static __always_inline bool rb_need_aux_wakeup(struct ring_buffer *rb)
 {
 	if (rb->aux_overwrite)
 		return false;
-- 
2.11.0

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

* Re: [PATCH] perf/core: Move the inline keyword at the beginning of function declaration
  2018-03-08 20:28 [PATCH] perf/core: Move the inline keyword at the beginning of function declaration Mathieu Malaterre
@ 2018-06-22  7:22 ` Mathieu Malaterre
  2018-06-22  9:12 ` [tip:perf/urgent] perf/core: Move the inline keyword at the beginning of the " tip-bot for Mathieu Malaterre
  1 sibling, 0 replies; 3+ messages in thread
From: Mathieu Malaterre @ 2018-06-22  7:22 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: trival, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim, LKML

ping ?
On Thu, Mar 8, 2018 at 9:29 PM Mathieu Malaterre <malat@debian.org> wrote:
>
> The inline keyword was not at the beginning of the function declaration.
> Fix the following warning (reported at W=1)
>
>   CC      kernel/events/ring_buffer.o
> kernel/events/ring_buffer.c:105:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
>  static bool __always_inline
>  ^~~~~~
> kernel/events/ring_buffer.c:116:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
>  static int __always_inline
>  ^~~~~~
> kernel/events/ring_buffer.c:416:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
>  static bool __always_inline rb_need_aux_wakeup(struct ring_buffer *rb)
>  ^~~~~~
>   AR      kernel/events/built-in.o
>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
>  kernel/events/ring_buffer.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
> index 6c6b3c48db71..03e39e3df543 100644
> --- a/kernel/events/ring_buffer.c
> +++ b/kernel/events/ring_buffer.c
> @@ -102,7 +102,7 @@ static void perf_output_put_handle(struct perf_output_handle *handle)
>         preempt_enable();
>  }
>
> -static bool __always_inline
> +static __always_inline bool
>  ring_buffer_has_space(unsigned long head, unsigned long tail,
>                       unsigned long data_size, unsigned int size,
>                       bool backward)
> @@ -113,7 +113,7 @@ ring_buffer_has_space(unsigned long head, unsigned long tail,
>                 return CIRC_SPACE(tail, head, data_size) >= size;
>  }
>
> -static int __always_inline
> +static __always_inline int
>  __perf_output_begin(struct perf_output_handle *handle,
>                     struct perf_event *event, unsigned int size,
>                     bool backward)
> @@ -413,7 +413,7 @@ void *perf_aux_output_begin(struct perf_output_handle *handle,
>  }
>  EXPORT_SYMBOL_GPL(perf_aux_output_begin);
>
> -static bool __always_inline rb_need_aux_wakeup(struct ring_buffer *rb)
> +static __always_inline bool rb_need_aux_wakeup(struct ring_buffer *rb)
>  {
>         if (rb->aux_overwrite)
>                 return false;
> --
> 2.11.0
>

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

* [tip:perf/urgent] perf/core: Move the inline keyword at the beginning of the function declaration
  2018-03-08 20:28 [PATCH] perf/core: Move the inline keyword at the beginning of function declaration Mathieu Malaterre
  2018-06-22  7:22 ` Mathieu Malaterre
@ 2018-06-22  9:12 ` tip-bot for Mathieu Malaterre
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Mathieu Malaterre @ 2018-06-22  9:12 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: mingo, malat, tglx, namhyung, jolsa, peterz, alexander.shishkin,
	hpa, torvalds, acme, linux-kernel

Commit-ID:  57d6a7938a8fc6cee8420b40ca244220b41721f5
Gitweb:     https://git.kernel.org/tip/57d6a7938a8fc6cee8420b40ca244220b41721f5
Author:     Mathieu Malaterre <malat@debian.org>
AuthorDate: Thu, 8 Mar 2018 21:28:56 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 22 Jun 2018 11:07:47 +0200

perf/core: Move the inline keyword at the beginning of the function declaration

When building perf with W=1 the following warning triggers:

  CC      kernel/events/ring_buffer.o
  kernel/events/ring_buffer.c:105:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
   static bool __always_inline
   ^~~~~~
  ...

Move the inline keyword to the beginning of the function declaration.

Signed-off-by: Mathieu Malaterre <malat@debian.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: trival@kernel.org
Link: http://lkml.kernel.org/r/20180308202856.9378-1-malat@debian.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/events/ring_buffer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index 1d8ca9ea9979..d11f60cbe8ca 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -103,7 +103,7 @@ out:
 	preempt_enable();
 }
 
-static bool __always_inline
+static __always_inline bool
 ring_buffer_has_space(unsigned long head, unsigned long tail,
 		      unsigned long data_size, unsigned int size,
 		      bool backward)
@@ -114,7 +114,7 @@ ring_buffer_has_space(unsigned long head, unsigned long tail,
 		return CIRC_SPACE(tail, head, data_size) >= size;
 }
 
-static int __always_inline
+static __always_inline int
 __perf_output_begin(struct perf_output_handle *handle,
 		    struct perf_event *event, unsigned int size,
 		    bool backward)
@@ -414,7 +414,7 @@ err:
 }
 EXPORT_SYMBOL_GPL(perf_aux_output_begin);
 
-static bool __always_inline rb_need_aux_wakeup(struct ring_buffer *rb)
+static __always_inline bool rb_need_aux_wakeup(struct ring_buffer *rb)
 {
 	if (rb->aux_overwrite)
 		return false;

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

end of thread, other threads:[~2018-06-22  9:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-08 20:28 [PATCH] perf/core: Move the inline keyword at the beginning of function declaration Mathieu Malaterre
2018-06-22  7:22 ` Mathieu Malaterre
2018-06-22  9:12 ` [tip:perf/urgent] perf/core: Move the inline keyword at the beginning of the " tip-bot for Mathieu Malaterre

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