Commit cd7e8841 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

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: default avatarGal Pressman <gal@nvidia.com>
Reviewed-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
Link: https://patch.msgid.link/20250707184115.2285277-6-kuba@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 4e655028
Loading
Loading
Loading
Loading
+12 −18
Original line number Diff line number Diff line
@@ -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);
	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));
		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,
		ret = ops->remove_rxfh_context(dev, ctx, rxfh.rss_context,
					       extack);
	} else {
			ret = ops->modify_rxfh_context(dev, ctx, &rxfh_dev,
						       extack);
		}
	} else {
		ret = ops->set_rxfh(dev, &rxfh_dev, extack);
		ret = ops->modify_rxfh_context(dev, ctx, &rxfh_dev, extack);
	}
	if (ret) {
		if (create) {