1. 06 Oct, 2023 5 commits
    • Florian Westphal's avatar
      xfrm: pass struct net to xfrm_decode_session wrappers · 2b1dc628
      Florian Westphal authored
      Preparation patch, extra arg is not used.
      No functional changes intended.
      
      This is needed to replace the xfrm session decode functions with
      the flow dissector.
      
      skb_flow_dissect() cannot be used as-is, because it attempts to deduce the
      'struct net' to use for bpf program fetch from skb->sk or skb->dev, but
      xfrm code path can see skbs that have neither sk or dev filled in.
      
      So either flow dissector needs to try harder, e.g. by also trying
      skb->dst->dev, or we have to pass the struct net explicitly.
      
      Passing the struct net doesn't look too bad to me, most places
      already have it available or can derive it from the output device.
      Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
      Link: https://lore.kernel.org/netdev/202309271628.27fd2187-oliver.sang@intel.com/Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      2b1dc628
    • Steffen Klassert's avatar
      Merge branch 'xfrm: Support GRO decapsulation for ESP in UDP encapsulation' · e377240a
      Steffen Klassert authored
      Antony Antony says:
      
      ============
      I have added how to enable this feature, and more description to the second
      patch. Here is copy of that.
      
      xfrm: Support GRO for IPv4i & IPv6 ESP in UDP encapsulation
      
      This patchset enables the GRO codepath for ESP in UDP encapsulated
      packets. Decapsulation happens at L2 and saves a full round through
      the stack for each packet. This is also needed to support HW offload
      for ESP in UDP encapsulation.
      
      Enabling this would imporove performance for ESP in UDP datapath, i.e
      IPsec with NAT in between. Our initial tests show 20% improvement.
      
      By default GRP for ESP-in-UDP is disabled for UDP sockets.
      To enable this feature for an ESP socket, the following two options
      need to be set:
      1. enable ESP-in-UDP: (this is already set by an IKE daemon).
         int type = UDP_ENCAP_ESPINUDP;
         setsockopt(fd, SOL_UDP, UDP_ENCAP, &type, sizeof(type));
      
      2. To enable GRO for ESP in UDP socket:
         type = true;
         setsockopt(fd, SOL_UDP, UDP_GRO, &type, sizeof(type));
      
      Enabling ESP-in-UDP has the side effect of preventing the Linux stack from
      seeing ESP packets at the L3 (when ESP OFFLOAD is disabled), as packets are
      immediately decapsulated from UDP and decrypted.
      This change may affect nftable rules that match on ESP packets  at L3.
      Also tcpdump won't see the ESP packet.
      
      Developers/admins are advised to review and adapt any nftable rules
      accordingly before enabling this feature to prevent potential rule breakage.
      Also tcpdump will not see from ESP packets from a ESP in UDP flow when this
      is enabled.
      
      Initial, a quick test showed performance difference of about 20%
      impromvent on the receiver, when using iperf, tcp flow, over ESP in UDP.
      ============
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      e377240a
    • Steffen Klassert's avatar
      xfrm: Support GRO for IPv6 ESP in UDP encapsulation · 221ddb72
      Steffen Klassert authored
      This patch enables the GRO codepath for IPv6 ESP in UDP encapsulated
      packets. Decapsulation happens at L2 and saves a full round through
      the stack for each packet. This is also needed to support HW offload
      for ESP in UDP encapsulation.
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Co-developed-by: default avatarAntony Antony <antony.antony@secunet.com>
      Signed-off-by: default avatarAntony Antony <antony.antony@secunet.com>
      Reviewed-by: default avatarEyal Birger <eyal.birger@gmail.com>
      221ddb72
    • Steffen Klassert's avatar
      xfrm: Support GRO for IPv4 ESP in UDP encapsulation · 172bf009
      Steffen Klassert authored
      This patch enables the GRO codepath for IPv4 ESP in UDP encapsulated
      packets. Decapsulation happens at L2 and saves a full round through
      the stack for each packet. This is also needed to support HW offload
      for ESP in UDP encapsulation.
      
      Enabling this would imporove performance for ESP in UDP datapath, i.e
      IPsec with NAT in between.
      
      By default GRP for ESP-in-UDP is disabled for UDP sockets.
      To enable this feature for an ESP socket, the following two options
      need to be set:
      1. enable ESP-in-UDP: (this is already set by an IKE daemon).
         int type = UDP_ENCAP_ESPINUDP;
         setsockopt(fd, SOL_UDP, UDP_ENCAP, &type, sizeof(type));
      
      2. To enable GRO for ESP in UDP socket:
         type = true;
         setsockopt(fd, SOL_UDP, UDP_GRO, &type, sizeof(type));
      
      Enabling ESP-in-UDP has the side effect of preventing the Linux stack from
      seeing ESP packets at the L3 (when ESP OFFLOAD is disabled), as packets are
      immediately decapsulated from UDP and decrypted.
      This change may affect nftable rules that match on ESP packets at L3.
      Also tcpdump won't see the ESP packet.
      
      Developers/admins are advised to review and adapt any nftable rules
      accordingly before enabling this feature to prevent potential rule breakage.
      Also tcpdump will not see from ESP packets from a ESP in UDP flow, when this
      is enabled.
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Co-developed-by: default avatarAntony Antony <antony.antony@secunet.com>
      Signed-off-by: default avatarAntony Antony <antony.antony@secunet.com>
      Reviewed-by: default avatarEyal Birger <eyal.birger@gmail.com>
      172bf009
    • Steffen Klassert's avatar
      xfrm: Use the XFRM_GRO to indicate a GRO call on input · b439475a
      Steffen Klassert authored
      This is needed to support GRO for ESP in UDP encapsulation.
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Co-developed-by: default avatarAntony Antony <antony.antony@secunet.com>
      Signed-off-by: default avatarAntony Antony <antony.antony@secunet.com>
      Reviewed-by: default avatarEyal Birger <eyal.birger@gmail.com>
      b439475a
  2. 05 Oct, 2023 1 commit
  3. 28 Sep, 2023 1 commit
  4. 20 Sep, 2023 33 commits
    • David S. Miller's avatar
      Merge branch 'ionic-better-tx-sg=handling' · 3a69ab87
      David S. Miller authored
      Shannon Nelson says:
      
      ====================
      ionic: better Tx SG handling
      
      The primary patch here is to be sure we're not hitting linearize on a Tx
      skb when we don't really need to.  The other two are related details.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3a69ab87
    • Shannon Nelson's avatar
      ionic: expand the descriptor bufs array · 529cdfd5
      Shannon Nelson authored
      When processing a TSO we may have frags spread across several
      descriptors, and the total count of frags in one skb may exceed
      our per descriptor IONIC_MAX_FRAGS: this is fine as long as
      each descriptor has fewer frags than the limit.  Since the skb
      could have as many as MAX_SKB_FRAGS, and the first descriptor
      is where we track and map the frag buffers, we need to be sure
      we can map buffers for all of the frags plus the TSO header in
      the first descriptor's buffer array.
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      529cdfd5
    • Shannon Nelson's avatar
      ionic: add a check for max SGs and SKB frags · 40d83539
      Shannon Nelson authored
      Add a check of the queue's max_sg_elems against the maximum frags we
      expect to see per SKB and take the smaller of the two as our max for
      the queues' descriptor buffer allocations.
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      40d83539
    • Shannon Nelson's avatar
      ionic: count SGs in packet to minimize linearize · 4d9d7220
      Shannon Nelson authored
      There are some cases where an skb carries more frags than the
      number of SGs that ionic can support per descriptor - this
      forces the driver to linearize the skb.  However, if this
      is a TSO packet that is going to become multiple descriptors
      (one per MTU-sized packet) and spread the frags across them,
      this time-consuming linearization is likely not necessary.
      
      We scan the frag list and count up the number of SGs that
      would be created for each descriptor that would be generated,
      and only linearize if we hit the SG limit on a descriptor.
      In most cases, we won't even get to the frag list scan, so
      this doesn't affect typical traffic.
      Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4d9d7220
    • David S. Miller's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue · 4fa7011d
      David S. Miller authored
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2023-09-18 (ice)
      
      This series contains updates to ice driver only.
      
      Sergey prepends ICE_ to PTP timer commands to clearly convey namespace
      of commands.
      
      Karol adds retrying to acquire hardware semaphore for cross-timestamping
      and avoids writing to timestamp registers on E822 devices. He also
      renames some defines to be more clear and align with the data sheet.
      Additionally, a range check is moved in order to reduce duplicated code.
      
      Jake adds cross-timestamping support for E823 devices as well as adds
      checks against netlist to aid in determining support for GNSS. He also
      corrects improper pin assignment for certain E810-T devices and
      refactors/cleanups PTP related code such as adding PHY model to ease checks
      for different needed implementations, removing unneeded EXTTS flag, and
      adding macro to check for source timer owner.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4fa7011d
    • David S. Miller's avatar
      Merge branch 'mdio-platform-remove-void' · a76c22e2
      David S. Miller authored
      Uwe Kleine-König says:
      
      ====================
      net: mdio: Convert to platform remove callback returning void
      
      this series convert all platform drivers below drivers/net/mdio 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, please apply the remainder of this series anyhow.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a76c22e2
    • Uwe Kleine-König's avatar
      net: mdio: xgene: Convert to platform remove callback returning void · 032ca4f9
      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>
      032ca4f9
    • Uwe Kleine-König's avatar
      net: mdio: sun4i: Convert to platform remove callback returning void · efd8d907
      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 avatarJernej Skrabec <jernej.skrabec@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      efd8d907
    • 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: Kurt Kanzenbach's avatarKurt Kanzenbach <kurt@linutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      beb8592d