net/mlx5: Remove redundant lag function to get pf num
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / lag.c
index 48aa6e030bcffdd4393ba7c26e200443f9e5c84b..959605559858e79eab92dc3725e3eb9e4b4b2d61 100644 (file)
@@ -595,27 +595,6 @@ void mlx5_lag_add(struct mlx5_core_dev *dev, struct net_device *netdev)
                              err);
 }
 
-int mlx5_lag_get_pf_num(struct mlx5_core_dev *dev, int *pf_num)
-{
-       struct mlx5_lag *ldev;
-       int n;
-
-       ldev = mlx5_lag_dev_get(dev);
-       if (!ldev) {
-               mlx5_core_warn(dev, "no lag device, can't get pf num\n");
-               return -EINVAL;
-       }
-
-       for (n = 0; n < MLX5_MAX_PORTS; n++)
-               if (ldev->pf[n].dev == dev) {
-                       *pf_num = n;
-                       return 0;
-               }
-
-       mlx5_core_warn(dev, "wasn't able to locate pf in the lag device\n");
-       return -EINVAL;
-}
-
 /* Must be called with intf_mutex held */
 void mlx5_lag_remove(struct mlx5_core_dev *dev)
 {