patch "base: arch_topology: fix section mismatch build warnings" added to driver-core-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
base: arch_topology: fix section mismatch build warnings
to my driver-core git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
in the driver-core-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
452562abb5b76c14449dead2a7113f641893e8bcMon Sep 17 00:00:00 2001
From: Sudeep Holla <[email protected]>
Date: Thu, 7 Sep 2017 15:16:05 +0100
Subject: 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.
--- drivers/base/arch_topology.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/base/arch_topology.c +6 -6
@@ -166,11 +166,11 @@ bool __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu) }#ifdef CONFIG_CPU_FREQ -static cpumask_var_t cpus_to_visit; -static void parsing_done_workfn (struct work_struct *work); -static DECLARE_WORK(parsing_done_work, parsing_done_workfn); +static cpumask_var_t cpus_to_visit__initdata ; +static void __init parsing_done_workfn (struct work_struct *work); +static __initdata DECLARE_WORK(parsing_done_work, parsing_done_workfn); -static int +static int __init init_cpu_capacity_callback (struct notifier_block *nb,unsigned long val,void *data)
@@ -206,7 +206,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,return 0 ; } -static struct notifier_block init_cpu_capacity_notifier = { +static struct notifier_block init_cpu_capacity_notifier__initdata = { .notifier_call = init_cpu_capacity_callback, };
@@ -232,7 +232,7 @@ static int __init register_cpufreq_notifier(void) }core_initcall (register_cpufreq_notifier); -static void parsing_done_workfn (struct work_struct *work) +static void __init parsing_done_workfn (struct work_struct *work) {cpufreq_unregister_notifier (&init_cpu_capacity_notifier,CPUFREQ_POLICY_NOTIFIER );
Signature · 1 line
2.14.1