perf/core: Move the inline keyword at the beginning of function declaration
PATCH 1/1 perf/core: Move the inline keyword at the beginning of function declaration
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.okernel/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
--- kernel/events/ring_buffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/events/ring_buffer.c +3 -3
@@ -102,7 +102,7 @@ static void perf_output_put_handle(struct perf_output_handle *handle)preempt_enable (); } -static bool __always_inline +static __always_inline boolring_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;
Signature · 1 line
2.11.0
ping ?
Quoted 55 lines · Mathieu Malaterre
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.okernel/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_inlinerb_need_aux_wakeup(struct ring_buffer *rb)
^~~~~~
ARkernel/events/built-in.oSigned-off-by Mathieu Malaterre <[email protected]>--- kernel/events/ring_buffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)kernel/events/ring_buffer.c +3
-4@@ -102,7 +102,7 @@ static void perf_output_put_handle(struct perf_output_handle *handle)preempt_enable (); } -static bool __always_inline +static __always_inline boolring_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
tip-bot for Mathieu Malaterre
merge bot[tip:perf/urgent] perf/core: Move the inline keyword at the beginning of the function declaration
In reply to Mathieu Malaterreperf/core: Move the inline keyword at the beginning of the function declaration
Commit-ID: 57d6a7938a8fc6cee8420b40ca244220b41721f5 Gitweb: https://git.kernel.org/tip/57d6a7938a8fc6cee8420b40ca244220b41721f5 Author: Mathieu Malaterre <[email protected]> AuthorDate: Thu, 8 Mar 2018 21:28:56 +0100 Committer: Ingo Molnar <[email protected]> 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.
--- kernel/events/ring_buffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/events/ring_buffer.c +3 -3
@@ -103,7 +103,7 @@ out:preempt_enable (); } -static bool __always_inline +static __always_inline boolring_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;