rpcd: iwinfo plugin fixes
[openwrt/svn-archive/archive.git] / target / linux / ar71xx / patches-4.1 / 100-MIPS-ath79-Avoid-using-unitialized-reg-variable.patch
1 From 8b7a76e72fc819753878cd5684e243f33f847c79 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] 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 --- a/arch/mips/ath79/common.c
24 +++ b/arch/mips/ath79/common.c
25 @@ -75,7 +75,7 @@ void ath79_device_reset_set(u32 mask)
26 else if (soc_is_qca955x())
27 reg = QCA955X_RESET_REG_RESET_MODULE;
28 else
29 - BUG();
30 + panic("Reset register not defined for this SOC");
31
32 spin_lock_irqsave(&ath79_device_reset_lock, flags);
33 t = ath79_reset_rr(reg);
34 @@ -103,7 +103,7 @@ void ath79_device_reset_clear(u32 mask)
35 else if (soc_is_qca955x())
36 reg = QCA955X_RESET_REG_RESET_MODULE;
37 else
38 - BUG();
39 + panic("Reset register not defined for this SOC");
40
41 spin_lock_irqsave(&ath79_device_reset_lock, flags);
42 t = ath79_reset_rr(reg);