Skip to content

Commit 9505b98

Browse files
arndbrafaeljw
authored andcommitted
cpufreq: pxa2xx: remove incorrect __init annotation
pxa_cpufreq_init_voltages() is marked __init but usually inlined into the non-__init pxa_cpufreq_init() function. When building with clang, it can stay as a standalone function in a discarded section, and produce this warning: WARNING: vmlinux.o(.text+0x616a00): Section mismatch in reference from the function pxa_cpufreq_init() to the function .init.text:pxa_cpufreq_init_voltages() The function pxa_cpufreq_init() references the function __init pxa_cpufreq_init_voltages(). This is often because pxa_cpufreq_init lacks a __init annotation or the annotation of pxa_cpufreq_init_voltages is wrong. Fixes: 50e77fc ("ARM: pxa: remove __init from cpufreq_driver->init()") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 5d094fe commit 9505b98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/cpufreq/pxa2xx-cpufreq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static int pxa_cpufreq_change_voltage(const struct pxa_freqs *pxa_freq)
143143
return ret;
144144
}
145145

146-
static void __init pxa_cpufreq_init_voltages(void)
146+
static void pxa_cpufreq_init_voltages(void)
147147
{
148148
vcc_core = regulator_get(NULL, "vcc_core");
149149
if (IS_ERR(vcc_core)) {
@@ -159,7 +159,7 @@ static int pxa_cpufreq_change_voltage(const struct pxa_freqs *pxa_freq)
159159
return 0;
160160
}
161161

162-
static void __init pxa_cpufreq_init_voltages(void) { }
162+
static void pxa_cpufreq_init_voltages(void) { }
163163
#endif
164164

165165
static void find_freq_tables(struct cpufreq_frequency_table **freq_table,

0 commit comments

Comments
 (0)