]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.108/cpufreq-pxa2xx-remove-incorrect-__init-annotation.patch
Linux 4.14.108
[thirdparty/kernel/stable-queue.git] / releases / 4.14.108 / cpufreq-pxa2xx-remove-incorrect-__init-annotation.patch
CommitLineData
d5b95bcd
GKH
1From 9505b98ccddc454008ca7efff90044e3e857c827 Mon Sep 17 00:00:00 2001
2From: Arnd Bergmann <arnd@arndb.de>
3Date: Thu, 7 Mar 2019 11:22:41 +0100
4Subject: cpufreq: pxa2xx: remove incorrect __init annotation
5
6From: Arnd Bergmann <arnd@arndb.de>
7
8commit 9505b98ccddc454008ca7efff90044e3e857c827 upstream.
9
10pxa_cpufreq_init_voltages() is marked __init but usually inlined into
11the non-__init pxa_cpufreq_init() function. When building with clang,
12it can stay as a standalone function in a discarded section, and produce
13this warning:
14
15WARNING: vmlinux.o(.text+0x616a00): Section mismatch in reference from the function pxa_cpufreq_init() to the function .init.text:pxa_cpufreq_init_voltages()
16The function pxa_cpufreq_init() references
17the function __init pxa_cpufreq_init_voltages().
18This is often because pxa_cpufreq_init lacks a __init
19annotation or the annotation of pxa_cpufreq_init_voltages is wrong.
20
21Fixes: 50e77fcd790e ("ARM: pxa: remove __init from cpufreq_driver->init()")
22Signed-off-by: Arnd Bergmann <arnd@arndb.de>
23Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
24Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
25Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
26Cc: All applicable <stable@vger.kernel.org>
27Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
28Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29
30---
31 drivers/cpufreq/pxa2xx-cpufreq.c | 4 ++--
32 1 file changed, 2 insertions(+), 2 deletions(-)
33
34--- a/drivers/cpufreq/pxa2xx-cpufreq.c
35+++ b/drivers/cpufreq/pxa2xx-cpufreq.c
36@@ -192,7 +192,7 @@ static int pxa_cpufreq_change_voltage(co
37 return ret;
38 }
39
40-static void __init pxa_cpufreq_init_voltages(void)
41+static void pxa_cpufreq_init_voltages(void)
42 {
43 vcc_core = regulator_get(NULL, "vcc_core");
44 if (IS_ERR(vcc_core)) {
45@@ -208,7 +208,7 @@ static int pxa_cpufreq_change_voltage(co
46 return 0;
47 }
48
49-static void __init pxa_cpufreq_init_voltages(void) { }
50+static void pxa_cpufreq_init_voltages(void) { }
51 #endif
52
53 static void find_freq_tables(struct cpufreq_frequency_table **freq_table,