ath79: add new OF only target for QCA MIPS silicon
[openwrt/openwrt.git] / target / linux / ath79 / patches-4.14 / 0012-MIPS-ath79-Avoid-using-unitialized-reg-variable.patch
1 From ac3a5ee699f3baa7654c93a3ffda46be82443344 Mon Sep 17 00:00:00 2001
2 From: Markos Chandras <markos.chandras@imgtec.com>
3 Date: Wed, 21 Aug 2013 11:47:22 +0100
4 Subject: [PATCH 12/27] MIPS: ath79: Avoid using unitialized 'reg' variable
5
6 Fixes the following build error:
7 arch/mips/include/asm/mach-ath79/ath79.h:139:20: error: 'reg' may be used
8 uninitialized in this function [-Werror=maybe-uninitialized]
9 arch/mips/ath79/common.c:62:6: note: 'reg' was declared here
10 In file included from arch/mips/ath79/common.c:20:0:
11 arch/mips/ath79/common.c: In function 'ath79_device_reset_clear':
12 arch/mips/include/asm/mach-ath79/ath79.h:139:20:
13 error: 'reg' may be used uninitialized in this function
14 [-Werror=maybe-uninitialized]
15 arch/mips/ath79/common.c:90:6: note: 'reg' was declared here
16
17 Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
18 Acked-by: Gabor Juhos <juhosg@openwrt.org>
19 ---
20 arch/mips/ath79/common.c | 4 ++--
21 1 file changed, 2 insertions(+), 2 deletions(-)
22
23 diff --git a/arch/mips/ath79/common.c b/arch/mips/ath79/common.c
24 index c782b10ddf50..a32a9181a296 100644
25 --- a/arch/mips/ath79/common.c
26 +++ b/arch/mips/ath79/common.c
27 @@ -106,7 +106,7 @@ void ath79_device_reset_set(u32 mask)
28 else if (soc_is_qca955x())
29 reg = QCA955X_RESET_REG_RESET_MODULE;
30 else
31 - BUG();
32 + panic("Reset register not defined for this SOC");
33
34 spin_lock_irqsave(&ath79_device_reset_lock, flags);
35 t = ath79_reset_rr(reg);
36 @@ -134,7 +134,7 @@ void ath79_device_reset_clear(u32 mask)
37 else if (soc_is_qca955x())
38 reg = QCA955X_RESET_REG_RESET_MODULE;
39 else
40 - BUG();
41 + panic("Reset register not defined for this SOC");
42
43 spin_lock_irqsave(&ath79_device_reset_lock, flags);
44 t = ath79_reset_rr(reg);
45 --
46 2.11.0
47