diff options
Diffstat (limited to 'target/mips/mikrotik-rb4xx/patches/3.14.22/0024-various-fixups-for-Werror.patch')
-rw-r--r-- | target/mips/mikrotik-rb4xx/patches/3.14.22/0024-various-fixups-for-Werror.patch | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/target/mips/mikrotik-rb4xx/patches/3.14.22/0024-various-fixups-for-Werror.patch b/target/mips/mikrotik-rb4xx/patches/3.14.22/0024-various-fixups-for-Werror.patch new file mode 100644 index 000000000..77883846d --- /dev/null +++ b/target/mips/mikrotik-rb4xx/patches/3.14.22/0024-various-fixups-for-Werror.patch @@ -0,0 +1,105 @@ +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: +diff --git a/drivers/net/phy/swconfig.c b/drivers/net/phy/swconfig.c +index c043ee4..c4d7689 100644 +--- a/drivers/net/phy/swconfig.c ++++ b/drivers/net/phy/swconfig.c +@@ -1107,30 +1107,14 @@ EXPORT_SYMBOL_GPL(unregister_switch); + static int __init + swconfig_init(void) + { +- int i, err; ++ int err; + + INIT_LIST_HEAD(&swdevs); +- +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)) +- err = genl_register_family(&switch_fam); +- if (err) +- return err; + +- for (i = 0; i < ARRAY_SIZE(swconfig_ops); i++) { +- err = genl_register_ops(&switch_fam, &swconfig_ops[i]); +- if (err) +- goto unregister; +- } +-#else + err = genl_register_family_with_ops(&switch_fam, swconfig_ops); + if (err) + return err; +-#endif + return 0; +- +-unregister: +- genl_unregister_family(&switch_fam); +- return err; + } + + static void __exit +-- +1.8.5.3 + |