From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org, andrew@lunn.ch,
przemyslaw.kitszel@intel.com, anthony.l.nguyen@intel.com,
sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com,
bbhushan2@marvell.com, tariqt@nvidia.com, mbloch@nvidia.com,
leon@kernel.org, gal@nvidia.com, ecree.xilinx@gmail.com,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 5/5] net: ethtool: reduce indent for _rxfh_context ops
Date: Mon, 30 Jun 2025 09:09:53 -0700 [thread overview]
Message-ID: <20250630160953.1093267-6-kuba@kernel.org> (raw)
In-Reply-To: <20250630160953.1093267-1-kuba@kernel.org>
Now that we don't have the compat code we can reduce the indent
a little. No functional changes.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
net/ethtool/ioctl.c | 31 +++++++++++++------------------
1 file changed, 13 insertions(+), 18 deletions(-)
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index 17dbda6afd96..fcd2a9a20527 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -1668,25 +1668,20 @@ static noinline_for_stack int ethtool_set_rxfh(struct net_device *dev,
rxfh_dev.rss_context = rxfh.rss_context;
rxfh_dev.input_xfrm = rxfh.input_xfrm;
- if (rxfh.rss_context) {
- if (create) {
- ret = ops->create_rxfh_context(dev, ctx, &rxfh_dev,
- extack);
- /* Make sure driver populates defaults */
- WARN_ON_ONCE(!ret && !rxfh_dev.key &&
- ops->rxfh_per_ctx_key &&
- !memchr_inv(ethtool_rxfh_context_key(ctx),
- 0, ctx->key_size));
- } else if (rxfh_dev.rss_delete) {
- ret = ops->remove_rxfh_context(dev, ctx,
- rxfh.rss_context,
- extack);
- } else {
- ret = ops->modify_rxfh_context(dev, ctx, &rxfh_dev,
- extack);
- }
- } else {
+ if (!rxfh.rss_context) {
ret = ops->set_rxfh(dev, &rxfh_dev, extack);
+ } else if (create) {
+ ret = ops->create_rxfh_context(dev, ctx, &rxfh_dev, extack);
+ /* Make sure driver populates defaults */
+ WARN_ON_ONCE(!ret && !rxfh_dev.key &&
+ ops->rxfh_per_ctx_key &&
+ !memchr_inv(ethtool_rxfh_context_key(ctx),
+ 0, ctx->key_size));
+ } else if (rxfh_dev.rss_delete) {
+ ret = ops->remove_rxfh_context(dev, ctx,
+ rxfh.rss_context, extack);
+ } else {
+ ret = ops->modify_rxfh_context(dev, ctx, &rxfh_dev, extack);
}
if (ret) {
if (create) {
--
2.50.0
next prev parent reply other threads:[~2025-06-30 16:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 16:09 [PATCH net-next 0/5] net: migrate remaining drivers to dedicated _rxfh_context ops Jakub Kicinski
2025-06-30 16:09 ` [PATCH net-next 1/5] eth: otx2: migrate to the *_rxfh_context ops Jakub Kicinski
2025-06-30 16:09 ` [PATCH net-next 2/5] eth: ice: drop the dead code related to rss_contexts Jakub Kicinski
2025-06-30 16:09 ` [PATCH net-next 3/5] eth: mlx5: migrate to the *_rxfh_context ops Jakub Kicinski
2025-06-30 16:58 ` Gal Pressman
2025-07-01 6:25 ` Gal Pressman
2025-07-02 2:43 ` Jakub Kicinski
2025-06-30 16:09 ` [PATCH net-next 4/5] net: ethtool: remove the compat code for _rxfh_context ops Jakub Kicinski
2025-07-01 2:13 ` kernel test robot
2025-07-01 6:26 ` Gal Pressman
2025-06-30 16:09 ` Jakub Kicinski [this message]
2025-07-01 6:26 ` [PATCH net-next 5/5] net: ethtool: reduce indent " Gal Pressman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250630160953.1093267-6-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=bbhushan2@marvell.com \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=gal@nvidia.com \
--cc=horms@kernel.org \
--cc=leon@kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
--cc=tariqt@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.