Skip to content
  1. Sep 20, 2023
    • Uwe Kleine-König's avatar
      net: mdio: octeon: Convert to platform remove callback returning void · 1e39b224
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e39b224
    • Uwe Kleine-König's avatar
      net: mdio: mux-multiplexer: Convert to platform remove callback returning void · caa9b6b8
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      caa9b6b8
    • Uwe Kleine-König's avatar
      net: mdio: mux-mmioreg: Convert to platform remove callback returning void · 70edec67
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      70edec67
    • Uwe Kleine-König's avatar
      net: mdio: mux-meson-gxl: Convert to platform remove callback returning void · a2879f75
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a2879f75
    • Uwe Kleine-König's avatar
      net: mdio: mux-meson-g12a: Convert to platform remove callback returning void · 458eb39d
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      458eb39d
    • Uwe Kleine-König's avatar
      net: mdio: mux-gpio: Convert to platform remove callback returning void · 0ec89350
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0ec89350
    • Uwe Kleine-König's avatar
      net: mdio: mux-bcm6368: Convert to platform remove callback returning void · 4c86f222
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c86f222
    • Uwe Kleine-König's avatar
      net: mdio: mux-bcm-iproc: Convert to platform remove callback returning void · 8de522ca
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8de522ca
    • Uwe Kleine-König's avatar
      net: mdio: mscc-miim: Convert to platform remove callback returning void · fa2bc3c4
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fa2bc3c4
    • Uwe Kleine-König's avatar
      net: mdio: moxart: Convert to platform remove callback returning void · 955d668e
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      955d668e
    • Uwe Kleine-König's avatar
      net: mdio: ipq8064: Convert to platform remove callback returning void · cd5510c2
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cd5510c2
    • Uwe Kleine-König's avatar
      net: mdio: ipq4019: Convert to platform remove callback returning void · b9ac5c42
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b9ac5c42
    • Uwe Kleine-König's avatar
      net: mdio: hisi-femac: Convert to platform remove callback returning void · 9ef2777c
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9ef2777c
    • Uwe Kleine-König's avatar
      net: mdio: gpio: Convert to platform remove callback returning void · d1760528
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d1760528
    • Uwe Kleine-König's avatar
      net: mdio: bcm-unimac: Convert to platform remove callback returning void · 9b12e3f5
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9b12e3f5
    • Uwe Kleine-König's avatar
      net: mdio: bcm-iproc: Convert to platform remove callback returning void · d5bd3038
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d5bd3038
    • Uwe Kleine-König's avatar
      net: mdio: aspeed: Convert to platform remove callback returning void · a8a61d72
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a8a61d72
    • David S. Miller's avatar
      Merge branch 'dsa-platform-remove-void' · ad1e15dd
      David S. Miller authored
      Uwe Kleine-König says:
      
      ====================
      net: dsa: Convert to platform remove callback returning void
      
      this series converts all platform drivers below drivers/net/dsa to use
      remove_new. The motivation is to get rid of an integer return code
      that is (mostly) ignored by the platform driver core and error prone on
      the driver side.
      
      See commit 5c5a7680
      
       ("platform: Provide a remove callback that
      returns no value") for an extended explanation and the eventual goal.
      
      There are no interdependencies between the patches. As there are still
      quite a few drivers to convert, I'm happy about every patch that makes
      it in. So even if there is a merge conflict with one patch until you
      apply or a subject prefix is suboptimal, please apply the remainder of
      this series anyhow.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ad1e15dd
    • Uwe Kleine-König's avatar
      net: dsa: vitesse-vsc73xx: Convert to platform remove callback returning void · ce322d45
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ce322d45
    • Uwe Kleine-König's avatar
      net: dsa: rzn1_a5psw: Convert to platform remove callback returning void · 76be075d
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      76be075d
    • Uwe Kleine-König's avatar
      net: dsa: realtek: Convert to platform remove callback returning void · d48a5472
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Reviewed-by: default avatarAlvin Šipraga <alsi@bang-olufsen.dk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d48a5472
    • Uwe Kleine-König's avatar
      net: dsa: ocelot: Convert to platform remove callback returning void · 68ace16c
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert these drivers from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      68ace16c
    • Uwe Kleine-König's avatar
      net: dsa: mt7530: Convert to platform remove callback returning void · 9764bbad
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Acked-by: default avatarDaniel Golle <daniel@makrotopia.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9764bbad
    • Uwe Kleine-König's avatar
      net: dsa: lantiq_gswip: Convert to platform remove callback returning void · a59f960c
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a59f960c
    • Uwe Kleine-König's avatar
      net: dsa: hirschmann: Convert to platform remove callback returning void · beb8592d
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Reviewed-by: default avatarKurt Kanzenbach <kurt@linutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      beb8592d
    • Uwe Kleine-König's avatar
      net: dsa: bcm_sf2: Convert to platform remove callback returning void · 75f5205f
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      75f5205f
    • Uwe Kleine-König's avatar
      net: dsa: b53: Convert to platform remove callback returning void · c306171d
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert these drivers from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c306171d
    • David S. Miller's avatar
      Merge branch 'net-platform-remove-void' · 6f0b985d
      David S. Miller authored
      Uwe Kleine-König says:
      
      ====================
      net: ethernet: Convert to platform remove callback returning void
      
      this series convert nearly all platform drivers below
      drivers/net/ethernet to use remove_new. The motivation is to get rid of
      an integer return code that is (mostly) ignored by the platform driver
      core and error prone on the driver side.
      
      There are 3 drivers I didn't convert (yet):
      
       drivers/net/ethernet/ti/cpsw.c
       drivers/net/ethernet/ti/cpsw_new.c
       drivers/net/ethernet/ti/am65-cpsw-nuss.c
      
      These are a bit more complicated because they don't always return 0 in
      .remove(). Unless someone is quicker than me, I'll address them in
      separate patches at a later time.
      
      See commit 5c5a7680
      
       ("platform: Provide a remove callback that
      returns no value") for an extended explanation and the eventual goal.
      
      There are no interdependencies between the patches. As there are still
      quite a few drivers to convert, I'm happy about every patch that makes
      it in. So even if there is a merge conflict with one patch until you
      apply, please apply the remainder of this series anyhow.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6f0b985d
    • Uwe Kleine-König's avatar
      net: ethernet: xscale: Convert to platform remove callback returning void · d74a5c15
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Acked-by: default avatarKrzysztof Hałasa <khalasa@piap.pl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d74a5c15
    • Uwe Kleine-König's avatar
      net: ethernet: xilinx: Convert to platform remove callback returning void · 2e0ec0af
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert these drivers from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2e0ec0af
    • Uwe Kleine-König's avatar
      net: ethernet: wiznet: Convert to platform remove callback returning void · 46b56684
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert these drivers from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      46b56684
    • Uwe Kleine-König's avatar
      net: ethernet: via: Convert to platform remove callback returning void · 70680f17
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert these drivers from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      70680f17
    • Uwe Kleine-König's avatar
      net: ethernet: tundra: Convert to platform remove callback returning void · 2f961952
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2f961952
    • Uwe Kleine-König's avatar
      net: ethernet: ti: Convert to platform remove callback returning void · 231ea972
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert these drivers from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> # cpmac
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      231ea972
    • Uwe Kleine-König's avatar
      net: ethernet: sunplus: Convert to platform remove callback returning void · ede778ed
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ede778ed
    • Uwe Kleine-König's avatar
      net: ethernet: sun: Convert to platform remove callback returning void · 8f4e45a0
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert these drivers from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f4e45a0
    • Uwe Kleine-König's avatar
      net: ethernet: socionext: Convert to platform remove callback returning void · d3cd3245
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert these drivers from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d3cd3245
    • Uwe Kleine-König's avatar
      net: ethernet: smsc: Convert to platform remove callback returning void · e8e2c863
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert these drivers from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8e2c863
    • Uwe Kleine-König's avatar
      net: ethernet: sgi: Convert to platform remove callback returning void · 506a327c
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert these drivers from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      506a327c
    • Uwe Kleine-König's avatar
      net: ethernet: seeq: Convert to platform remove callback returning void · 02c74030
      Uwe Kleine-König authored
      
      
      The .remove() callback for a platform driver returns an int which makes
      many driver authors wrongly assume it's possible to do error handling by
      returning an error code. However the value returned is ignored (apart
      from emitting a warning) and this typically results in resource leaks.
      To improve here there is a quest to make the remove callback return
      void. In the first step of this quest all drivers are converted to
      .remove_new() which already returns void. Eventually after all drivers
      are converted, .remove_new() is renamed to .remove().
      
      Trivially convert this driver from always returning zero in the remove
      callback to the void returning variant.
      
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      02c74030