Commit c511822f authored by Roi Dayan's avatar Roi Dayan Committed by Saeed Mahameed

net/mlx5: Remove redundant esw multiport validate function

The function didn't validate the value and doesn't require value
validation as it will always be valid true or false values.
Signed-off-by: default avatarRoi Dayan <roid@nvidia.com>
Reviewed-by: default avatarMaor Dickman <maord@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 20d5e0ef
......@@ -464,27 +464,6 @@ static int mlx5_devlink_esw_multiport_get(struct devlink *devlink, u32 id,
ctx->val.vbool = mlx5_lag_is_mpesw(dev);
return 0;
}
static int mlx5_devlink_esw_multiport_validate(struct devlink *devlink, u32 id,
union devlink_param_value val,
struct netlink_ext_ack *extack)
{
struct mlx5_core_dev *dev = devlink_priv(devlink);
if (!MLX5_ESWITCH_MANAGER(dev)) {
NL_SET_ERR_MSG_MOD(extack, "E-Switch is unsupported");
return -EOPNOTSUPP;
}
if (mlx5_eswitch_mode(dev) != MLX5_ESWITCH_OFFLOADS) {
NL_SET_ERR_MSG_MOD(extack,
"E-Switch must be in switchdev mode");
return -EBUSY;
}
return 0;
}
#endif
static int mlx5_devlink_eq_depth_validate(struct devlink *devlink, u32 id,
......@@ -563,7 +542,7 @@ static const struct devlink_param mlx5_devlink_params[] = {
BIT(DEVLINK_PARAM_CMODE_RUNTIME),
mlx5_devlink_esw_multiport_get,
mlx5_devlink_esw_multiport_set,
mlx5_devlink_esw_multiport_validate),
NULL),
#endif
DEVLINK_PARAM_GENERIC(IO_EQ_SIZE, BIT(DEVLINK_PARAM_CMODE_DRIVERINIT),
NULL, NULL, mlx5_devlink_eq_depth_validate),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment