aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2017-09-07 10:16:05 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-18 11:05:07 -0400
commit452562abb5b76c14449dead2a7113f641893e8bc (patch)
tree1ba8512ab0117325978320f0b3cb8f9356d36c0e
parent6878e7de6af726de47f9f3bec649c3f49e786586 (diff)
base: arch_topology: fix section mismatch build warnings
Commit 2ef7a2953c81 ("arm, arm64: factorize common cpu capacity default code") introduced init_cpu_capacity_callback and init_cpu_capacity_notifier which are referenced from initcall and are missing __init{,data} annotations resulting the below section mismatch build warnings. "WARNING: vmlinux.o(.text+0xbab790): Section mismatch in reference from the function init_cpu_capacity_callback() to the variable .init.text:$x The function init_cpu_capacity_callback() references the variable __init $x. This is often because init_cpu_capacity_callback lacks a __init annotation or the annotation of $x is wrong." This patch fixes the above build warnings by adding the required annotations. Fixes: 2ef7a2953c81 ("arm, arm64: factorize common cpu capacity default code") Cc: Juri Lelli <juri.lelli@arm.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/base/arch_topology.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index 41be9ff7d70a..6df7d6676a48 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -166,11 +166,11 @@ bool __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu)
166} 166}
167 167
168#ifdef CONFIG_CPU_FREQ 168#ifdef CONFIG_CPU_FREQ
169static cpumask_var_t cpus_to_visit; 169static cpumask_var_t cpus_to_visit __initdata;
170static void parsing_done_workfn(struct work_struct *work); 170static void __init parsing_done_workfn(struct work_struct *work);
171static DECLARE_WORK(parsing_done_work, parsing_done_workfn); 171static __initdata DECLARE_WORK(parsing_done_work, parsing_done_workfn);
172 172
173static int 173static int __init
174init_cpu_capacity_callback(struct notifier_block *nb, 174init_cpu_capacity_callback(struct notifier_block *nb,
175 unsigned long val, 175 unsigned long val,
176 void *data) 176 void *data)
@@ -206,7 +206,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
206 return 0; 206 return 0;
207} 207}
208 208
209static struct notifier_block init_cpu_capacity_notifier = { 209static struct notifier_block init_cpu_capacity_notifier __initdata = {
210 .notifier_call = init_cpu_capacity_callback, 210 .notifier_call = init_cpu_capacity_callback,
211}; 211};
212 212
@@ -232,7 +232,7 @@ static int __init register_cpufreq_notifier(void)
232} 232}
233core_initcall(register_cpufreq_notifier); 233core_initcall(register_cpufreq_notifier);
234 234
235static void parsing_done_workfn(struct work_struct *work) 235static void __init parsing_done_workfn(struct work_struct *work)
236{ 236{
237 cpufreq_unregister_notifier(&init_cpu_capacity_notifier, 237 cpufreq_unregister_notifier(&init_cpu_capacity_notifier,
238 CPUFREQ_POLICY_NOTIFIER); 238 CPUFREQ_POLICY_NOTIFIER);