0024-various-fixups-for-Werror.patch 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. From 45bdbeaf12f96a95bda6016a2aa943ae2dfceb96 Mon Sep 17 00:00:00 2001
  2. From: Phil Sutter <phil@nwl.cc>
  3. Date: Fri, 16 May 2014 04:37:17 +0200
  4. Subject: [PATCH] various fixups for -Werror
  5. ---
  6. arch/mips/ath79/common.c | 4 ++--
  7. arch/mips/ath79/dev-eth.c | 8 ++++----
  8. drivers/net/phy/swconfig.c | 18 +-----------------
  9. 3 files changed, 7 insertions(+), 23 deletions(-)
  10. diff --git a/arch/mips/ath79/common.c b/arch/mips/ath79/common.c
  11. index eb3966c..def54c2 100644
  12. --- a/arch/mips/ath79/common.c
  13. +++ b/arch/mips/ath79/common.c
  14. @@ -59,7 +59,7 @@ EXPORT_SYMBOL_GPL(ath79_ddr_wb_flush);
  15. void ath79_device_reset_set(u32 mask)
  16. {
  17. unsigned long flags;
  18. - u32 reg;
  19. + u32 reg = 0;
  20. u32 t;
  21. if (soc_is_ar71xx())
  22. @@ -87,7 +87,7 @@ EXPORT_SYMBOL_GPL(ath79_device_reset_set);
  23. void ath79_device_reset_clear(u32 mask)
  24. {
  25. unsigned long flags;
  26. - u32 reg;
  27. + u32 reg = 0;
  28. u32 t;
  29. if (soc_is_ar71xx())
  30. diff --git a/arch/mips/ath79/dev-eth.c b/arch/mips/ath79/dev-eth.c
  31. index 21feeb9..879f1cd 100644
  32. --- a/arch/mips/ath79/dev-eth.c
  33. +++ b/arch/mips/ath79/dev-eth.c
  34. @@ -121,7 +121,7 @@ static void __init ath79_mii_ctrl_set_if(unsigned int reg,
  35. static void ath79_mii_ctrl_set_speed(unsigned int reg, unsigned int speed)
  36. {
  37. void __iomem *base;
  38. - unsigned int mii_speed;
  39. + unsigned int mii_speed = 0;
  40. u32 t;
  41. switch (speed) {
  42. @@ -271,8 +271,8 @@ struct ath79_eth_pll_data ath79_eth1_pll_data;
  43. static u32 ath79_get_eth_pll(unsigned int mac, int speed)
  44. {
  45. - struct ath79_eth_pll_data *pll_data;
  46. - u32 pll_val;
  47. + struct ath79_eth_pll_data *pll_data = NULL;
  48. + u32 pll_val = 0;
  49. switch (mac) {
  50. case 0:
  51. @@ -511,7 +511,7 @@ struct ag71xx_switch_platform_data ath79_switch_data;
  52. static void __init ath79_init_eth_pll_data(unsigned int id)
  53. {
  54. struct ath79_eth_pll_data *pll_data;
  55. - u32 pll_10, pll_100, pll_1000;
  56. + u32 pll_10 = 0, pll_100 = 0, pll_1000 = 0;
  57. switch (id) {
  58. case 0:
  59. diff --git a/drivers/net/phy/swconfig.c b/drivers/net/phy/swconfig.c
  60. index c043ee4..c4d7689 100644
  61. --- a/drivers/net/phy/swconfig.c
  62. +++ b/drivers/net/phy/swconfig.c
  63. @@ -1107,30 +1107,14 @@ EXPORT_SYMBOL_GPL(unregister_switch);
  64. static int __init
  65. swconfig_init(void)
  66. {
  67. - int i, err;
  68. + int err;
  69. INIT_LIST_HEAD(&swdevs);
  70. -
  71. -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0))
  72. - err = genl_register_family(&switch_fam);
  73. - if (err)
  74. - return err;
  75. - for (i = 0; i < ARRAY_SIZE(swconfig_ops); i++) {
  76. - err = genl_register_ops(&switch_fam, &swconfig_ops[i]);
  77. - if (err)
  78. - goto unregister;
  79. - }
  80. -#else
  81. err = genl_register_family_with_ops(&switch_fam, swconfig_ops);
  82. if (err)
  83. return err;
  84. -#endif
  85. return 0;
  86. -
  87. -unregister:
  88. - genl_unregister_family(&switch_fam);
  89. - return err;
  90. }
  91. static void __exit
  92. --
  93. 1.8.5.3