* [PATCH 0/3] Fix some build warnings in perf/events subsystem.
@ 2021-05-26 11:52 Haocheng Xie
2021-05-26 11:52 ` [PATCH 1/3] perf core: Make local function perf_pmu_snapshot_aux() static Haocheng Xie
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Haocheng Xie @ 2021-05-26 11:52 UTC (permalink / raw)
To: mingo, acme, alexander.shishkin, jolsa, mark.rutland, mingo,
namhyung, peterz
Cc: linux-kernel, linux-perf-users, Haocheng Xie
I have got these warnings when building kernel with 'W=1' options:
kernel/events/core.c:6670:6: warning: no previous prototype for 'perf_pmu_snapshot_aux' [-Wmissing-prototypes]
kernel/events/core.c:143: warning: Function parameter or member 'cpu' not described in 'cpu_function_call'
kernel/events/core.c:11924: warning: Function parameter or member 'flags' not described in 'sys_perf_event_open'
kernel/events/core.c:12382: warning: Function parameter or member 'overflow_handler' not described in 'perf_event_create_kernel_counter'
kernel/events/core.c:12382: warning: Function parameter or member 'context' not described in 'perf_event_create_kernel_counter'
kernel/events/hw_breakpoint.c:461: warning: Function parameter or member 'context' not described in 'register_user_hw_breakpoint'
kernel/events/hw_breakpoint.c:560: warning: Function parameter or member 'context' not described in 'register_wide_hw_breakpoint'
The 3-patch series will fix these warnings.
Haocheng Xie (3):
perf core: Make local function perf_pmu_snapshot_aux() static
perf core: Fix some kernel-doc warnings.
perf/hw_breakpoint: Fix kernel-doc warnings in perf hw_breakpoint
kernel/events/core.c | 6 +++++-
kernel/events/hw_breakpoint.c | 2 ++
2 files changed, 7 insertions(+), 1 deletion(-)
--
2.9.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] perf core: Make local function perf_pmu_snapshot_aux() static
2021-05-26 11:52 [PATCH 0/3] Fix some build warnings in perf/events subsystem Haocheng Xie
@ 2021-05-26 11:52 ` Haocheng Xie
2021-05-26 12:04 ` Peter Zijlstra
2021-05-26 11:52 ` [PATCH 2/3] perf core: Fix some kernel-doc warnings Haocheng Xie
2021-05-26 11:52 ` [PATCH 3/3] perf/hw_breakpoint: Fix kernel-doc warnings in perf hw_breakpoint Haocheng Xie
2 siblings, 1 reply; 6+ messages in thread
From: Haocheng Xie @ 2021-05-26 11:52 UTC (permalink / raw)
To: mingo, acme, alexander.shishkin, jolsa, mark.rutland, mingo,
namhyung, peterz
Cc: linux-kernel, linux-perf-users, Haocheng Xie
Fixes the following W=1 kernel build warning:
kernel/events/core.c:6670:6: warning: no previous prototype for 'perf_pmu_snapshot_aux' [-Wmissing-prototypes]
Signed-off-by: Haocheng Xie <xiehaocheng.cn@gmail.com>
---
kernel/events/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 6fee4a7..0d98d6a 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -6667,7 +6667,7 @@ static unsigned long perf_prepare_sample_aux(struct perf_event *event,
return data->aux_size;
}
-long perf_pmu_snapshot_aux(struct perf_buffer *rb,
+static long perf_pmu_snapshot_aux(struct perf_buffer *rb,
struct perf_event *event,
struct perf_output_handle *handle,
unsigned long size)
--
2.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] perf core: Fix some kernel-doc warnings.
2021-05-26 11:52 [PATCH 0/3] Fix some build warnings in perf/events subsystem Haocheng Xie
2021-05-26 11:52 ` [PATCH 1/3] perf core: Make local function perf_pmu_snapshot_aux() static Haocheng Xie
@ 2021-05-26 11:52 ` Haocheng Xie
2021-05-26 11:52 ` [PATCH 3/3] perf/hw_breakpoint: Fix kernel-doc warnings in perf hw_breakpoint Haocheng Xie
2 siblings, 0 replies; 6+ messages in thread
From: Haocheng Xie @ 2021-05-26 11:52 UTC (permalink / raw)
To: mingo, acme, alexander.shishkin, jolsa, mark.rutland, mingo,
namhyung, peterz
Cc: linux-kernel, linux-perf-users, Haocheng Xie
Fix the following W=1 kernel build warning(s):
kernel/events/core.c:143: warning: Function parameter or member 'cpu' not described in 'cpu_function_call'
kernel/events/core.c:11924: warning: Function parameter or member 'flags' not described in 'sys_perf_event_open'
kernel/events/core.c:12382: warning: Function parameter or member 'overflow_handler' not described in 'perf_event_create_kernel_counter'
kernel/events/core.c:12382: warning: Function parameter or member 'context' not described in 'perf_event_create_kernel_counter'
Signed-off-by: Haocheng Xie <xiehaocheng.cn@gmail.com>
---
kernel/events/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 0d98d6a..7988e40 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -132,6 +132,7 @@ task_function_call(struct task_struct *p, remote_function_f func, void *info)
/**
* cpu_function_call - call a function on the cpu
+ * @cpu: target cpu to queue this function
* @func: the function to be called
* @info: the function call argument
*
@@ -11917,6 +11918,7 @@ __perf_event_ctx_lock_double(struct perf_event *group_leader,
* @pid: target pid
* @cpu: target cpu
* @group_fd: group leader event fd
+ * @flags: perf event open flags
*/
SYSCALL_DEFINE5(perf_event_open,
struct perf_event_attr __user *, attr_uptr,
@@ -12373,6 +12375,8 @@ SYSCALL_DEFINE5(perf_event_open,
* @attr: attributes of the counter to create
* @cpu: cpu in which the counter is bound
* @task: task to profile (NULL for percpu)
+ * @overflow_handler: callback to trigger when we hit the event
+ * @context: context data could be used in overflow_handler callback
*/
struct perf_event *
perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
--
2.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] perf/hw_breakpoint: Fix kernel-doc warnings in perf hw_breakpoint
2021-05-26 11:52 [PATCH 0/3] Fix some build warnings in perf/events subsystem Haocheng Xie
2021-05-26 11:52 ` [PATCH 1/3] perf core: Make local function perf_pmu_snapshot_aux() static Haocheng Xie
2021-05-26 11:52 ` [PATCH 2/3] perf core: Fix some kernel-doc warnings Haocheng Xie
@ 2021-05-26 11:52 ` Haocheng Xie
2 siblings, 0 replies; 6+ messages in thread
From: Haocheng Xie @ 2021-05-26 11:52 UTC (permalink / raw)
To: mingo, acme, alexander.shishkin, jolsa, mark.rutland, mingo,
namhyung, peterz
Cc: linux-kernel, linux-perf-users, Haocheng Xie
Fix the following W=1 kernel build warning(s):
kernel/events/hw_breakpoint.c:461: warning: Function parameter or member 'context' not described in 'register_user_hw_breakpoint'
kernel/events/hw_breakpoint.c:560: warning: Function parameter or member 'context' not described in 'register_wide_hw_breakpoint'
Signed-off-by: Haocheng Xie <xiehaocheng.cn@gmail.com>
---
kernel/events/hw_breakpoint.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c
index b48d703..8359734 100644
--- a/kernel/events/hw_breakpoint.c
+++ b/kernel/events/hw_breakpoint.c
@@ -451,6 +451,7 @@ int register_perf_hw_breakpoint(struct perf_event *bp)
* register_user_hw_breakpoint - register a hardware breakpoint for user space
* @attr: breakpoint attributes
* @triggered: callback to trigger when we hit the breakpoint
+ * @context: context data could be used in the triggered callback
* @tsk: pointer to 'task_struct' of the process to which the address belongs
*/
struct perf_event *
@@ -550,6 +551,7 @@ EXPORT_SYMBOL_GPL(unregister_hw_breakpoint);
* register_wide_hw_breakpoint - register a wide breakpoint in the kernel
* @attr: breakpoint attributes
* @triggered: callback to trigger when we hit the breakpoint
+ * @context: context data could be used in the triggered callback
*
* @return a set of per_cpu pointers to perf events
*/
--
2.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] perf core: Make local function perf_pmu_snapshot_aux() static
2021-05-26 11:52 ` [PATCH 1/3] perf core: Make local function perf_pmu_snapshot_aux() static Haocheng Xie
@ 2021-05-26 12:04 ` Peter Zijlstra
2021-05-27 3:50 ` Haocheng Xie
0 siblings, 1 reply; 6+ messages in thread
From: Peter Zijlstra @ 2021-05-26 12:04 UTC (permalink / raw)
To: Haocheng Xie
Cc: mingo, acme, alexander.shishkin, jolsa, mark.rutland, mingo,
namhyung, linux-kernel, linux-perf-users
On Wed, May 26, 2021 at 07:52:18PM +0800, Haocheng Xie wrote:
> Fixes the following W=1 kernel build warning:
> kernel/events/core.c:6670:6: warning: no previous prototype for 'perf_pmu_snapshot_aux' [-Wmissing-prototypes]
>
> Signed-off-by: Haocheng Xie <xiehaocheng.cn@gmail.com>
> ---
> kernel/events/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 6fee4a7..0d98d6a 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -6667,7 +6667,7 @@ static unsigned long perf_prepare_sample_aux(struct perf_event *event,
> return data->aux_size;
> }
>
> -long perf_pmu_snapshot_aux(struct perf_buffer *rb,
> +static long perf_pmu_snapshot_aux(struct perf_buffer *rb,
> struct perf_event *event,
> struct perf_output_handle *handle,
> unsigned long size)
Your $subject is broken (superfluous whitespace) and you've wrecked
alignment of the arguments in the core.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] perf core: Make local function perf_pmu_snapshot_aux() static
2021-05-26 12:04 ` Peter Zijlstra
@ 2021-05-27 3:50 ` Haocheng Xie
0 siblings, 0 replies; 6+ messages in thread
From: Haocheng Xie @ 2021-05-27 3:50 UTC (permalink / raw)
To: peterz
Cc: acme, alexander.shishkin, jolsa, linux-kernel, linux-perf-users,
mark.rutland, mingo, mingo, namhyung, xiehaocheng.cn
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 1342 bytes --]
* Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Wed, May 26, 2021 at 07:52:18PM +0800, Haocheng Xie wrote:
> > Fixes the following W=1 kernel build warning:
> > kernel/events/core.c:6670:6: warning: no previous prototype for 'perf_pmu_snapshot_aux' [-Wmissing-prototypes]
> >
> > Signed-off-by: Haocheng Xie <xiehaocheng.cn@gmail.com>
> > ---
> > kernel/events/core.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/kernel/events/core.c b/kernel/events/core.c
> > index 6fee4a7..0d98d6a 100644
> > --- a/kernel/events/core.c
> > +++ b/kernel/events/core.c
> > @@ -6667,7 +6667,7 @@ static unsigned long perf_prepare_sample_aux(struct perf_event *event,
> > return data->aux_size;
> > }
> >
> > -long perf_pmu_snapshot_aux(struct perf_buffer *rb,
> > +static long perf_pmu_snapshot_aux(struct perf_buffer *rb,
> > struct perf_event *event,
> > struct perf_output_handle *handle,
> > unsigned long size)
>
> Your $subject is broken (superfluous whitespace) and you've wrecked
> alignment of the arguments in the core.
Hi, Peter:
Sorry for bothering you for these simple mistakes.
I will optimize my patch series and send a "v2" version after that.
Thanks,
Haocheng Xie
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-05-27 3:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 11:52 [PATCH 0/3] Fix some build warnings in perf/events subsystem Haocheng Xie
2021-05-26 11:52 ` [PATCH 1/3] perf core: Make local function perf_pmu_snapshot_aux() static Haocheng Xie
2021-05-26 12:04 ` Peter Zijlstra
2021-05-27 3:50 ` Haocheng Xie
2021-05-26 11:52 ` [PATCH 2/3] perf core: Fix some kernel-doc warnings Haocheng Xie
2021-05-26 11:52 ` [PATCH 3/3] perf/hw_breakpoint: Fix kernel-doc warnings in perf hw_breakpoint Haocheng Xie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.