]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.117/sh-fix-multiple-function-definition-build-errors.patch
Remove duplicated commits
[thirdparty/kernel/stable-queue.git] / releases / 4.14.117 / sh-fix-multiple-function-definition-build-errors.patch
1 From 96894918936dfe80a782db66c0c5164bab65a2f6 Mon Sep 17 00:00:00 2001
2 From: Randy Dunlap <rdunlap@infradead.org>
3 Date: Fri, 5 Apr 2019 18:39:30 -0700
4 Subject: sh: fix multiple function definition build errors
5
6 [ Upstream commit acaf892ecbf5be7710ae05a61fd43c668f68ad95 ]
7
8 Many of the sh CPU-types have their own plat_irq_setup() and
9 arch_init_clk_ops() functions, so these same (empty) functions in
10 arch/sh/boards/of-generic.c are not needed and cause build errors.
11
12 If there is some case where these empty functions are needed, they can
13 be retained by marking them as "__weak" while at the same time making
14 builds that do not need them succeed.
15
16 Fixes these build errors:
17
18 arch/sh/boards/of-generic.o: In function `plat_irq_setup':
19 (.init.text+0x134): multiple definition of `plat_irq_setup'
20 arch/sh/kernel/cpu/sh2/setup-sh7619.o:(.init.text+0x30): first defined here
21 arch/sh/boards/of-generic.o: In function `arch_init_clk_ops':
22 (.init.text+0x118): multiple definition of `arch_init_clk_ops'
23 arch/sh/kernel/cpu/sh2/clock-sh7619.o:(.init.text+0x0): first defined here
24
25 Link: http://lkml.kernel.org/r/9ee4e0c5-f100-86a2-bd4d-1d3287ceab31@infradead.org
26 Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
27 Reported-by: kbuild test robot <lkp@intel.com>
28 Cc: Takashi Iwai <tiwai@suse.de>
29 Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
30 Cc: Rich Felker <dalias@libc.org>
31 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
32 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
33 Signed-off-by: Sasha Levin <sashal@kernel.org>
34 ---
35 arch/sh/boards/of-generic.c | 4 ++--
36 1 file changed, 2 insertions(+), 2 deletions(-)
37
38 diff --git a/arch/sh/boards/of-generic.c b/arch/sh/boards/of-generic.c
39 index 4feb7c86f4ac..5e83ea12303b 100644
40 --- a/arch/sh/boards/of-generic.c
41 +++ b/arch/sh/boards/of-generic.c
42 @@ -180,10 +180,10 @@ static struct sh_machine_vector __initmv sh_of_generic_mv = {
43
44 struct sh_clk_ops;
45
46 -void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
47 +void __init __weak arch_init_clk_ops(struct sh_clk_ops **ops, int idx)
48 {
49 }
50
51 -void __init plat_irq_setup(void)
52 +void __init __weak plat_irq_setup(void)
53 {
54 }
55 --
56 2.20.1
57