Skip to contentSkip to conversation

perf/core: fix missing static inline on perf_cgroup_switch

PATCH Applied Ben Dooks (Codethink) 4 participants 4 messages Nov 6, 2019 – Nov 13, 2019 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf/core: fix missing static inline on perf_cgroup_switch

It looks like a "static inline" has been missed in front of the empty definition of perf_cgroup_switch under certain configurations. Fixes the following sparse warning:

kernel/events/core.c:1035:1: warning: symbol 'perf_cgroup_switch' was not declared. Should it be static?

---
Cc: Peter Zijlstra <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: [email protected]

---
 kernel/events/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/events/core.c +1 -1
index aec8dba2bea4..a4bad9f32fb7 100644
@@ -1031,7 +1031,7 @@ perf_cgroup_set_timestamp(struct task_struct *task,
 {
 }
 
-void
+static inline void
 perf_cgroup_switch(struct task_struct *task, struct task_struct *next)
 {
 }
Signature · 1 line
2.24.0.rc1
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · Ben Dooks (Codethink)

It looks like a "static inline" has been missed in front of the empty definition of perf_cgroup_switch under certain configurations. Fixes the following sparse warning:

kernel/events/core.c:1035:1: warning: symbol 'perf_cgroup_switch' was not declared. Should it be static?

---
Cc: Peter Zijlstra <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: [email protected]

Quoted 3 lines
---
 kernel/events/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Mark.

Quoted 17 lines
kernel/events/core.c +1 -1
index aec8dba2bea4..a4bad9f32fb7 100644
@@ -1031,7 +1031,7 @@ perf_cgroup_set_timestamp(struct task_struct *task,
 {
 }
 
-void
+static inline void
 perf_cgroup_switch(struct task_struct *task, struct task_struct *next)
 {
 }
Signature · 1 line
2.24.0.rc1
#3 lore raw

[tip: perf/urgent] perf/core: Fix missing static inline on perf_cgroup_switch()

In reply to Ben Dooks (Codethink)
The following commit has been merged into the perf/urgent branch of tip:

The following commit has been merged into the perf/urgent branch of tip:

Commit-ID:     d00dbd29814236ad128ff9517e8f7af6b6ef4ba0
Gitweb:        https://git.kernel.org/tip/d00dbd29814236ad128ff9517e8f7af6b6ef4ba0
Author:        Ben Dooks (Codethink) <[email protected]>
AuthorDate:    Wed, 06 Nov 2019 13:25:27 
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Wed, 13 Nov 2019 08:16:44 +01:00

perf/core: Fix missing static inline on perf_cgroup_switch()

It looks like a "static inline" has been missed in front of the empty definition of perf_cgroup_switch() under certain configurations.

Fixes the following sparse warning:

kernel/events/core.c:1035:1: warning: symbol 'perf_cgroup_switch' was not declared. Should it be static?

Cc Alexander Shishkin <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vince Weaver <[email protected]>
---
 kernel/events/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/events/core.c +1 -1
index 466e333..00a0146 100644
@@ -1031,7 +1031,7 @@ perf_cgroup_set_timestamp(struct task_struct *task,
 {
 }
 
-void
+static inline void
 perf_cgroup_switch(struct task_struct *task, struct task_struct *next)
 {
 }