net/mlx5e: Remove unused parameter
authorMaxim Mikityanskiy <maximmi@mellanox.com>
Wed, 27 Mar 2019 11:46:50 +0000 (13:46 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 23 Apr 2019 19:09:22 +0000 (12:09 -0700)
mdev is unused in mlx5e_rx_is_linear_skb.

Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/params.c
drivers/net/ethernet/mellanox/mlx5/core/en/params.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c

index fa6661ea6310cba567450c9924075d87e2b8b264..d3744bffbae3991b8e13fc258ae65ab9406c2a52 100644 (file)
@@ -27,8 +27,7 @@ u8 mlx5e_mpwqe_log_pkts_per_wqe(struct mlx5e_params *params)
        return MLX5_MPWRQ_LOG_WQE_SZ - order_base_2(linear_frag_sz);
 }
 
-bool mlx5e_rx_is_linear_skb(struct mlx5_core_dev *mdev,
-                           struct mlx5e_params *params)
+bool mlx5e_rx_is_linear_skb(struct mlx5e_params *params)
 {
        u32 frag_sz = mlx5e_rx_get_linear_frag_sz(params);
 
@@ -44,7 +43,7 @@ bool mlx5e_rx_mpwqe_is_linear_skb(struct mlx5_core_dev *mdev,
        s8 signed_log_num_strides_param;
        u8 log_num_strides;
 
-       if (!mlx5e_rx_is_linear_skb(mdev, params))
+       if (!mlx5e_rx_is_linear_skb(params))
                return false;
 
        if (order_base_2(frag_sz) > MLX5_MAX_MPWQE_LOG_WQE_STRIDE_SZ)
@@ -98,7 +97,7 @@ u16 mlx5e_get_rq_headroom(struct mlx5_core_dev *mdev,
        linear_rq_headroom += NET_IP_ALIGN;
 
        is_linear_skb = (params->rq_wq_type == MLX5_WQ_TYPE_CYCLIC) ?
-               mlx5e_rx_is_linear_skb(mdev, params) :
+               mlx5e_rx_is_linear_skb(params) :
                mlx5e_rx_mpwqe_is_linear_skb(mdev, params);
 
        return is_linear_skb ? linear_rq_headroom : 0;
index 0ef1436c4c76107dfe2fbdc48aac5452f860f86b..b106a0236f368d18ec583f75a4974ed12d14dcf2 100644 (file)
@@ -8,8 +8,7 @@
 
 u32 mlx5e_rx_get_linear_frag_sz(struct mlx5e_params *params);
 u8 mlx5e_mpwqe_log_pkts_per_wqe(struct mlx5e_params *params);
-bool mlx5e_rx_is_linear_skb(struct mlx5_core_dev *mdev,
-                           struct mlx5e_params *params);
+bool mlx5e_rx_is_linear_skb(struct mlx5e_params *params);
 bool mlx5e_rx_mpwqe_is_linear_skb(struct mlx5_core_dev *mdev,
                                  struct mlx5e_params *params);
 u8 mlx5e_mpwqe_get_log_rq_size(struct mlx5e_params *params);
index 8cab86a558ab3892e5f19d9cd54eca23dccc1813..1c328dbb6fe01e522193f285705ca0f07ef19fe4 100644 (file)
@@ -518,7 +518,7 @@ static int mlx5e_alloc_rq(struct mlx5e_channel *c,
                        goto err_free;
                }
 
-               rq->wqe.skb_from_cqe = mlx5e_rx_is_linear_skb(mdev, params) ?
+               rq->wqe.skb_from_cqe = mlx5e_rx_is_linear_skb(params) ?
                        mlx5e_skb_from_cqe_linear :
                        mlx5e_skb_from_cqe_nonlinear;
                rq->mkey_be = c->mkey_be;
@@ -1960,7 +1960,7 @@ static void mlx5e_build_rq_frags_info(struct mlx5_core_dev *mdev,
                byte_count += MLX5E_METADATA_ETHER_LEN;
 #endif
 
-       if (mlx5e_rx_is_linear_skb(mdev, params)) {
+       if (mlx5e_rx_is_linear_skb(params)) {
                int frag_stride;
 
                frag_stride = mlx5e_rx_get_linear_frag_sz(params);
@@ -3722,7 +3722,7 @@ int mlx5e_change_mtu(struct net_device *netdev, int new_mtu,
        new_channels.params.sw_mtu = new_mtu;
 
        if (params->xdp_prog &&
-           !mlx5e_rx_is_linear_skb(priv->mdev, &new_channels.params)) {
+           !mlx5e_rx_is_linear_skb(&new_channels.params)) {
                netdev_err(netdev, "MTU(%d) > %d is not allowed while XDP enabled\n",
                           new_mtu, MLX5E_XDP_MAX_MTU);
                err = -EINVAL;
@@ -4163,7 +4163,7 @@ static int mlx5e_xdp_allowed(struct mlx5e_priv *priv, struct bpf_prog *prog)
        new_channels.params = priv->channels.params;
        new_channels.params.xdp_prog = prog;
 
-       if (!mlx5e_rx_is_linear_skb(priv->mdev, &new_channels.params)) {
+       if (!mlx5e_rx_is_linear_skb(&new_channels.params)) {
                netdev_warn(netdev, "XDP is not allowed with MTU(%d) > %d\n",
                            new_channels.params.sw_mtu, MLX5E_XDP_MAX_MTU);
                return -EINVAL;
@@ -4506,7 +4506,7 @@ void mlx5e_build_rq_params(struct mlx5_core_dev *mdev,
        if (!slow_pci_heuristic(mdev) &&
            mlx5e_striding_rq_possible(mdev, params) &&
            (mlx5e_rx_mpwqe_is_linear_skb(mdev, params) ||
-            !mlx5e_rx_is_linear_skb(mdev, params)))
+            !mlx5e_rx_is_linear_skb(params)))
                MLX5E_SET_PFLAG(params, MLX5E_PFLAG_RX_STRIDING_RQ, true);
        mlx5e_set_rq_type(mdev, params);
        mlx5e_init_rq_type_params(mdev, params);