Commit 76eb6ea4 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'mlx4_core-cleanups'



Tariq Toukan says:

====================
mlx4_core cleanups

This patchset by Erez contains cleanups to the mlx4_core driver.

Patch 1 replaces -EINVAL with -EOPNOTSUPP for unsupported operations.
Patch 2 fixes some coding style issues.

Series generated against net-next commit:
97e6c858 net: usb: aqc111: Initialize wol_cfg with memset in aqc111_suspend
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 30fcd6a9 92a59ad0
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ struct workqueue_struct *mlx4_wq;

#ifdef CONFIG_MLX4_DEBUG

int mlx4_debug_level = 0;
int mlx4_debug_level; /* 0 by default */
module_param_named(debug_level, mlx4_debug_level, int, 0644);
MODULE_PARM_DESC(debug_level, "Enable debug tracing if > 0");

@@ -313,7 +313,7 @@ int mlx4_check_port_params(struct mlx4_dev *dev,
		for (i = 0; i < dev->caps.num_ports - 1; i++) {
			if (port_type[i] != port_type[i + 1]) {
				mlx4_err(dev, "Only same port types supported on this HCA, aborting\n");
				return -EINVAL;
				return -EOPNOTSUPP;
			}
		}
	}
@@ -322,7 +322,7 @@ int mlx4_check_port_params(struct mlx4_dev *dev,
		if (!(port_type[i] & dev->caps.supported_type[i+1])) {
			mlx4_err(dev, "Requested port type for port %d is not supported on this HCA\n",
				 i + 1);
			return -EINVAL;
			return -EOPNOTSUPP;
		}
	}
	return 0;
@@ -1188,8 +1188,7 @@ static int __set_port_type(struct mlx4_port_info *info,
		mlx4_err(mdev,
			 "Requested port type for port %d is not supported on this HCA\n",
			 info->port);
		err = -EINVAL;
		goto err_sup;
		return -EOPNOTSUPP;
	}

	mlx4_stop_sense(mdev);
@@ -1211,7 +1210,7 @@ static int __set_port_type(struct mlx4_port_info *info,
		for (i = 1; i <= mdev->caps.num_ports; i++) {
			if (mdev->caps.possible_type[i] == MLX4_PORT_TYPE_AUTO) {
				mdev->caps.possible_type[i] = mdev->caps.port_type[i];
				err = -EINVAL;
				err = -EOPNOTSUPP;
			}
		}
	}
@@ -1237,7 +1236,7 @@ static int __set_port_type(struct mlx4_port_info *info,
out:
	mlx4_start_sense(mdev);
	mutex_unlock(&priv->port_mutex);
err_sup:

	return err;
}