mfd: db8500-prcmu: Fix some section annotations
Subsystems (2)
PATCH 1/1 mfd: db8500-prcmu: Fix some section annotations
When building the kernel with Clang, the following section mismatch warnings appear:
WARNING: vmlinux.o(.text+0x7239cc): Section mismatch in reference from the function db8500_prcmu_probe() to the function .init.text:init_prcm_registers()
The function db8500_prcmu_probe() references
the function __init init_prcm_registers().
This is often because db8500_prcmu_probe lacks a __init annotation or the annotation of init_prcm_registers is wrong.
WARNING: vmlinux.o(.text+0x723e28): Section mismatch in reference from the function db8500_prcmu_probe() to the function .init.text:fw_project_name()
The function db8500_prcmu_probe() references
the function __init fw_project_name().
This is often because db8500_prcmu_probe lacks a __init annotation or the annotation of fw_project_name is wrong.
db8500_prcmu_probe should not be marked as __init so remove the __init annotation from fw_project_name and init_prcm_registers.
--- drivers/mfd/db8500-prcmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/db8500-prcmu.c +2 -2
@@ -2584,7 +2584,7 @@ static struct irq_chip prcmu_irq_chip = { .irq_unmask = prcmu_irq_unmask, }; -static __init char *fw_project_name (u32 project) +static char *fw_project_name (u32 project) {switch (project) {case PRCMU_FW_PROJECT_U8500 :
@@ -2732,7 +2732,7 @@ void __init db8500_prcmu_early_init(u32 phy_base, u32 size)INIT_WORK (&mb0_transfer.mask_work, prcmu_mask_work); } -static void __init init_prcm_registers (void ) +static void init_prcm_registers (void ) {u32 val;
Signature · 1 line
2.19.1
Quoted 19 lines · Nathan Chancellor
When building the kernel with Clang, the following section mismatch warnings appear:
WARNING:
vmlinux.o(.text+0x7239cc): Section mismatch in reference from the functiondb8500_prcmu_probe()to the function .init.text:init_prcm_registers()
The functiondb8500_prcmu_probe()references
the function__initinit_prcm_registers().
This is often becausedb8500_prcmu_probelacks a__initannotation or the annotation ofinit_prcm_registersis wrong.WARNING:
vmlinux.o(.text+0x723e28): Section mismatch in reference from the functiondb8500_prcmu_probe()to the function .init.text:fw_project_name()
The functiondb8500_prcmu_probe()references
the function__initfw_project_name().
This is often becausedb8500_prcmu_probelacks a__initannotation or the annotation offw_project_nameis wrong.
Quoted 7 lines
db8500_prcmu_probeshould not be marked as__initso remove the__initannotation fromfw_project_nameandinit_prcm_registers.Signed-off-by Nathan Chancellor <[email protected]>--- drivers/mfd/db8500-prcmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied for v4.21, thanks.
Signature · 4 lines
Lee Jones [???] Linaro Services Technical Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog