]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.4.177/mfd-db8500-prcmu-fix-some-section-annotations.patch
Linux 4.4.177
[thirdparty/kernel/stable-queue.git] / releases / 4.4.177 / mfd-db8500-prcmu-fix-some-section-annotations.patch
CommitLineData
f601ab3a
SL
1From 695975cfbeac23f21c159e72db0ee1e9af59fe29 Mon Sep 17 00:00:00 2001
2From: Nathan Chancellor <natechancellor@gmail.com>
3Date: Wed, 17 Oct 2018 17:56:28 -0700
4Subject: mfd: db8500-prcmu: Fix some section annotations
5
6[ Upstream commit a3888f62fe66429fad3be7f2ba962e1e08c26fd6 ]
7
8When building the kernel with Clang, the following section mismatch
9warnings appear:
10
11WARNING: vmlinux.o(.text+0x7239cc): Section mismatch in reference from
12the function db8500_prcmu_probe() to the function
13.init.text:init_prcm_registers()
14The function db8500_prcmu_probe() references
15the function __init init_prcm_registers().
16This is often because db8500_prcmu_probe lacks a __init
17annotation or the annotation of init_prcm_registers is wrong.
18
19WARNING: vmlinux.o(.text+0x723e28): Section mismatch in reference from
20the function db8500_prcmu_probe() to the function
21.init.text:fw_project_name()
22The function db8500_prcmu_probe() references
23the function __init fw_project_name().
24This is often because db8500_prcmu_probe lacks a __init
25annotation or the annotation of fw_project_name is wrong.
26
27db8500_prcmu_probe should not be marked as __init so remove the __init
28annotation from fw_project_name and init_prcm_registers.
29
30Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
31Signed-off-by: Lee Jones <lee.jones@linaro.org>
32Signed-off-by: Sasha Levin <sashal@kernel.org>
33---
34 drivers/mfd/db8500-prcmu.c | 4 ++--
35 1 file changed, 2 insertions(+), 2 deletions(-)
36
37diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
38index 12099b09a9a71..e71b9f23379d0 100644
39--- a/drivers/mfd/db8500-prcmu.c
40+++ b/drivers/mfd/db8500-prcmu.c
41@@ -2610,7 +2610,7 @@ static struct irq_chip prcmu_irq_chip = {
42 .irq_unmask = prcmu_irq_unmask,
43 };
44
45-static __init char *fw_project_name(u32 project)
46+static char *fw_project_name(u32 project)
47 {
48 switch (project) {
49 case PRCMU_FW_PROJECT_U8500:
50@@ -2758,7 +2758,7 @@ void __init db8500_prcmu_early_init(u32 phy_base, u32 size)
51 INIT_WORK(&mb0_transfer.mask_work, prcmu_mask_work);
52 }
53
54-static void __init init_prcm_registers(void)
55+static void init_prcm_registers(void)
56 {
57 u32 val;
58
59--
602.19.1
61