]>
Commit | Line | Data |
---|---|---|
d5b95bcd GKH |
1 | From 9505b98ccddc454008ca7efff90044e3e857c827 Mon Sep 17 00:00:00 2001 |
2 | From: Arnd Bergmann <arnd@arndb.de> | |
3 | Date: Thu, 7 Mar 2019 11:22:41 +0100 | |
4 | Subject: cpufreq: pxa2xx: remove incorrect __init annotation | |
5 | ||
6 | From: Arnd Bergmann <arnd@arndb.de> | |
7 | ||
8 | commit 9505b98ccddc454008ca7efff90044e3e857c827 upstream. | |
9 | ||
10 | pxa_cpufreq_init_voltages() is marked __init but usually inlined into | |
11 | the non-__init pxa_cpufreq_init() function. When building with clang, | |
12 | it can stay as a standalone function in a discarded section, and produce | |
13 | this warning: | |
14 | ||
15 | WARNING: vmlinux.o(.text+0x616a00): Section mismatch in reference from the function pxa_cpufreq_init() to the function .init.text:pxa_cpufreq_init_voltages() | |
16 | The function pxa_cpufreq_init() references | |
17 | the function __init pxa_cpufreq_init_voltages(). | |
18 | This is often because pxa_cpufreq_init lacks a __init | |
19 | annotation or the annotation of pxa_cpufreq_init_voltages is wrong. | |
20 | ||
21 | Fixes: 50e77fcd790e ("ARM: pxa: remove __init from cpufreq_driver->init()") | |
22 | Signed-off-by: Arnd Bergmann <arnd@arndb.de> | |
23 | Acked-by: Viresh Kumar <viresh.kumar@linaro.org> | |
24 | Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> | |
25 | Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> | |
26 | Cc: All applicable <stable@vger.kernel.org> | |
27 | Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> | |
28 | Signed-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, |