Skip to contentSkip to conversation

perf, x86: Fix some broken initconsts

PATCH In review Andi Kleen 2 participants 2 messages Apr 21, 2013

Subsystems (2)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 perf, x86: Fix some broken initconsts

From: Andi Kleen <[email protected]>

arch/x86/kernel/cpu/perf_event_knc.c +2 -2
index 4b7731b..2cfe648 100644
@@ -17,7 +17,7 @@ static const u64 knc_perfmon_event_map[] =
   [PERF_COUNT_HW_BRANCH_MISSES]		= 0x002b,
 };
 
-static __initconst u64 knc_hw_cache_event_ids
+static __initconst const u64 knc_hw_cache_event_ids
 				[PERF_COUNT_HW_CACHE_MAX]
 				[PERF_COUNT_HW_CACHE_OP_MAX]
 				[PERF_COUNT_HW_CACHE_RESULT_MAX] =
@@ -284,7 +284,7 @@ static struct attribute *intel_knc_formats_attr[] = {
 	NULL,
 };
 
-static __initconst struct x86_pmu knc_pmu = {
+static __initconst const struct x86_pmu knc_pmu = {
 	.name			= "knc",
 	.handle_irq		= knc_pmu_handle_irq,
 	.disable_all		= knc_pmu_disable_all,
#1 lore raw
Quoted 18 lines · Andi Kleen

From: Andi Kleen <[email protected]>

arch/x86/kernel/cpu/perf_event_knc.c +1 -1
index 4b7731b..2cfe648 100644
@@ -17,7 +17,7 @@ static const u64 knc_perfmon_event_map[] =
   [PERF_COUNT_HW_BRANCH_MISSES]		= 0x002b,
 };
 
-static __initconst u64 knc_hw_cache_event_ids
+static __initconst const u64 knc_hw_cache_event_ids
 				[PERF_COUNT_HW_CACHE_MAX]
 				[PERF_COUNT_HW_CACHE_OP_MAX]
 				[PERF_COUNT_HW_CACHE_RESULT_MAX] =

arch/x86/kernel/cpu/perf_event_knc.c static struct attribute *intel_knc_formats_attr[] = { · line 290

Quoted 8 lines
arch/x86/kernel/cpu/perf_event_knc.c +1 -1
@@ -284,7 +284,7 @@ static struct attribute *intel_knc_formats_attr[] = {
 	NULL,
 };
 
-static __initconst struct x86_pmu knc_pmu = {
+static __initconst const struct x86_pmu knc_pmu = {
 	.name			= "knc",
 	.handle_irq		= knc_pmu_handle_irq,
 	.disable_all		= knc_pmu_disable_all,

Already fixed in:

c391c7884633 x86: Constify a few items

Thanks,

Ingo