summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5/mad.c
diff options
context:
space:
mode:
authorDaniel Jurgens <danielj@mellanox.com>2018-01-04 17:25:34 +0200
committerJason Gunthorpe <jgg@mellanox.com>2018-01-08 11:42:21 -0700
commit508562d6f708888b10127c2892513f76ea8b22ba (patch)
tree948375b7e7d89c057f2811bbabd20c658b3d6930 /drivers/infiniband/hw/mlx5/mad.c
parent908d6460b3d81dd2dca9e9e8fc7fa19b5a1e4d99 (diff)
downloadop-kernel-dev-508562d6f708888b10127c2892513f76ea8b22ba.zip
op-kernel-dev-508562d6f708888b10127c2892513f76ea8b22ba.tar.gz
IB/mlx5: Reduce the use of num_port capability
Remove use of the num_ports general capability throughout. The number of ports will be variable in the future, and reported in a different way. Signed-off-by: Daniel Jurgens <danielj@mellanox.com> Reviewed-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/mad.c')
-rw-r--r--drivers/infiniband/hw/mlx5/mad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/mad.c b/drivers/infiniband/hw/mlx5/mad.c
index 1003b01..0559e0a 100644
--- a/drivers/infiniband/hw/mlx5/mad.c
+++ b/drivers/infiniband/hw/mlx5/mad.c
@@ -519,7 +519,7 @@ int mlx5_query_mad_ifc_port(struct ib_device *ibdev, u8 port,
int ext_active_speed;
int err = -ENOMEM;
- if (port < 1 || port > MLX5_CAP_GEN(mdev, num_ports)) {
+ if (port < 1 || port > dev->num_ports) {
mlx5_ib_warn(dev, "invalid port number %d\n", port);
return -EINVAL;
}
OpenPOWER on IntegriCloud