Re: [PATCH] cpufreq: pxa2xx: remove incorrect __init annotation

From: Robert Jarzmik
Date: Thu Mar 07 2019 - 14:19:55 EST


Arnd Bergmann <arnd@xxxxxxxx> writes:

> 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: 50e77fcd790e ("ARM: pxa: remove __init from cpufreq_driver->init()")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Acked-by: Robert Jarzmik <robert.jarzmik@xxxxxxx>

Cheers.

--
Robert