summaryrefslogtreecommitdiff
path: root/target/mips/mikrotik-rb4xx/patches/4.1.10/0024-various-fixups-for-Werror.patch
blob: 57c1c1e069191bff9f609d9dc96336b3b04eaaac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From 45bdbeaf12f96a95bda6016a2aa943ae2dfceb96 Mon Sep 17 00:00:00 2001
From: Phil Sutter <phil@nwl.cc>
Date: Fri, 16 May 2014 04:37:17 +0200
Subject: [PATCH] various fixups for -Werror

---
 arch/mips/ath79/common.c   |  4 ++--
 arch/mips/ath79/dev-eth.c  |  8 ++++----
 drivers/net/phy/swconfig.c | 18 +-----------------
 3 files changed, 7 insertions(+), 23 deletions(-)

diff --git a/arch/mips/ath79/common.c b/arch/mips/ath79/common.c
index eb3966c..def54c2 100644
--- a/arch/mips/ath79/common.c
+++ b/arch/mips/ath79/common.c
@@ -59,7 +59,7 @@ EXPORT_SYMBOL_GPL(ath79_ddr_wb_flush);
 void ath79_device_reset_set(u32 mask)
 {
 	unsigned long flags;
-	u32 reg;
+	u32 reg = 0;
 	u32 t;
 
 	if (soc_is_ar71xx())
@@ -87,7 +87,7 @@ EXPORT_SYMBOL_GPL(ath79_device_reset_set);
 void ath79_device_reset_clear(u32 mask)
 {
 	unsigned long flags;
-	u32 reg;
+	u32 reg = 0;
 	u32 t;
 
 	if (soc_is_ar71xx())
diff --git a/arch/mips/ath79/dev-eth.c b/arch/mips/ath79/dev-eth.c
index 21feeb9..879f1cd 100644
--- a/arch/mips/ath79/dev-eth.c
+++ b/arch/mips/ath79/dev-eth.c
@@ -121,7 +121,7 @@ static void __init ath79_mii_ctrl_set_if(unsigned int reg,
 static void ath79_mii_ctrl_set_speed(unsigned int reg, unsigned int speed)
 {
 	void __iomem *base;
-	unsigned int mii_speed;
+	unsigned int mii_speed = 0;
 	u32 t;
 
 	switch (speed) {
@@ -271,8 +271,8 @@ struct ath79_eth_pll_data ath79_eth1_pll_data;
 
 static u32 ath79_get_eth_pll(unsigned int mac, int speed)
 {
-	struct ath79_eth_pll_data *pll_data;
-	u32 pll_val;
+	struct ath79_eth_pll_data *pll_data = NULL;
+	u32 pll_val = 0;
 
 	switch (mac) {
 	case 0:
@@ -511,7 +511,7 @@ struct ag71xx_switch_platform_data ath79_switch_data;
 static void __init ath79_init_eth_pll_data(unsigned int id)
 {
 	struct ath79_eth_pll_data *pll_data;
-	u32 pll_10, pll_100, pll_1000;
+	u32 pll_10 = 0, pll_100 = 0, pll_1000 = 0;
 
 	switch (id) {
 	case 0: