From: Jakub Kicinski Date: Mon, 7 Jul 2025 18:41:15 +0000 (-0700) Subject: net: ethtool: reduce indent for _rxfh_context ops X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd7e8841b61f78542456ac59a165bdbe7765f496;p=thirdparty%2Flinux.git net: ethtool: reduce indent for _rxfh_context ops Now that we don't have the compat code we can reduce the indent a little. No functional changes. Reviewed-by: Gal Pressman Reviewed-by: Edward Cree Link: https://patch.msgid.link/20250707184115.2285277-6-kuba@kernel.org Signed-off-by: Jakub Kicinski --- diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index d8a17350d3e8c..139f95620cddb 100644 --- a/net/ethtool/ioctl.c +++ b/net/ethtool/ioctl.c @@ -1664,25 +1664,19 @@ 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) {