Skip to contentSkip to conversation

x86, perf_event: Fix build warning

PATCH In review Borislav Petkov 3 participants 3 messages Jan 25, 2013 – Jan 26, 2013

Subsystems (2)
lore
Share & tools
lore

Borislav Petkov

author maintainer
#0 lore raw

PATCH 1/1 x86, perf_event: Fix build warning

From: Borislav Petkov <[email protected]>

Fix this one:

arch/x86/kernel/cpu/perf_event.c: In function ‘init_hw_perf_events’:
arch/x86/kernel/cpu/perf_event.c:1508:7: warning: assignment from incompatible pointer type [enabled by default] arch/x86/kernel/cpu/perf_event.c:1510:31: warning: assignment from incompatible pointer type [enabled by default]

Cc Andi Kleen <[email protected]>
Cc Stephane Eranian <[email protected]>
---
 arch/x86/kernel/cpu/perf_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/perf_event.c +1 -1
index 1e2519d0dc7a..c6ef37af76b0 100644
@@ -1503,7 +1503,7 @@ static int __init init_hw_perf_events(void)
 		filter_events(x86_pmu_events_group.attrs);
 
 	if (x86_pmu.cpu_events) {
-		struct attribute *tmp;
+		struct attribute **tmp;
 
 		tmp = merge_attr(x86_pmu_events_group.attrs, x86_pmu.cpu_events);
 		if (!WARN_ON(!tmp))
Signature · 1 line
1.8.1.rc3
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Borislav Petkov

From: Borislav Petkov <[email protected]>

Fix this one:

arch/x86/kernel/cpu/perf_event.c: In function ‘init_hw_perf_events’:
arch/x86/kernel/cpu/perf_event.c:1508:7: warning: assignment from incompatible pointer type [enabled by default] arch/x86/kernel/cpu/perf_event.c:1510:31: warning: assignment from incompatible pointer type [enabled by default]

Quoted 3 lines
Cc Andi Kleen <[email protected]>
Cc Stephane Eranian <[email protected]>
Quoted 20 lines
---
 arch/x86/kernel/cpu/perf_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/perf_event.c +1 -2
index 1e2519d0dc7a..c6ef37af76b0 100644
@@ -1503,7 +1503,7 @@ static int __init init_hw_perf_events(void)
                filter_events(x86_pmu_events_group.attrs);
 
        if (x86_pmu.cpu_events) {
-               struct attribute *tmp;
+               struct attribute **tmp;
 
                tmp = merge_attr(x86_pmu_events_group.attrs, x86_pmu.cpu_events);
                if (!WARN_ON(!tmp))
--

1.8.1.rc3

#2 lore raw

[tip:perf/x86] perf/x86: Fix type to address build warning

In reply to Borislav Petkov
Commit-ID:  fc7d3e64651e4de80262e48a3fb75128fffb8ef3
Gitweb:     http://git.kernel.org/tip/fc7d3e64651e4de80262e48a3fb75128fffb8ef3
Author:     Borislav Petkov <[email protected]>
AuthorDate: Fri, 25 Jan 2013 18:46:07 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 25 Jan 2013 19:32:02 +0100

perf/x86: Fix type to address build warning

Fix this one:

arch/x86/kernel/cpu/perf_event.c: In function ‘init_hw_perf_events’:
arch/x86/kernel/cpu/perf_event.c:1508:7: warning: assignment from incompatible pointer type [enabled by default] arch/x86/kernel/cpu/perf_event.c:1510:31: warning: assignment from incompatible pointer type [enabled by default]

---
 arch/x86/kernel/cpu/perf_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/perf_event.c +1 -1
index 1e2519d..c6ef37a 100644
@@ -1503,7 +1503,7 @@ static int __init init_hw_perf_events(void)
 		filter_events(x86_pmu_events_group.attrs);
 
 	if (x86_pmu.cpu_events) {
-		struct attribute *tmp;
+		struct attribute **tmp;
 
 		tmp = merge_attr(x86_pmu_events_group.attrs, x86_pmu.cpu_events);
 		if (!WARN_ON(!tmp))