Skip to content

Commit e122fca

Browse files
author
Benjamin Poirier
committed
net/mlx5e: Add wrapping for auxiliary_driver ops and remove unused args
JIRA: https://issues.redhat.com/browse/RHEL-43870 Upstream-status: v6.8-rc1 commit b1a33e6 Author: Tariq Toukan <tariqt@nvidia.com> Date: Thu Aug 17 11:49:04 2023 +0300 net/mlx5e: Add wrapping for auxiliary_driver ops and remove unused args Turn some of the struct auxiliary_driver ops into wrappers to stop having dummy local vars passed as unused arguments. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Gal Pressman <gal@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Benjamin Poirier <bpoirier@redhat.com>
1 parent c4845f3 commit e122fca

File tree

1 file changed

+15
-7
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+15
-7
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6067,7 +6067,7 @@ static int mlx5e_resume(struct auxiliary_device *adev)
60676067
return 0;
60686068
}
60696069

6070-
static int mlx5e_suspend(struct auxiliary_device *adev, pm_message_t state)
6070+
static int _mlx5e_suspend(struct auxiliary_device *adev)
60716071
{
60726072
struct mlx5e_dev *mlx5e_dev = auxiliary_get_drvdata(adev);
60736073
struct mlx5e_priv *priv = mlx5e_dev->priv;
@@ -6085,15 +6085,18 @@ static int mlx5e_suspend(struct auxiliary_device *adev, pm_message_t state)
60856085
return 0;
60866086
}
60876087

6088-
static int mlx5e_probe(struct auxiliary_device *adev,
6089-
const struct auxiliary_device_id *id)
6088+
static int mlx5e_suspend(struct auxiliary_device *adev, pm_message_t state)
6089+
{
6090+
return _mlx5e_suspend(adev);
6091+
}
6092+
6093+
static int _mlx5e_probe(struct auxiliary_device *adev)
60906094
{
60916095
struct mlx5_adev *edev = container_of(adev, struct mlx5_adev, adev);
60926096
const struct mlx5e_profile *profile = &mlx5e_nic_profile;
60936097
struct mlx5_core_dev *mdev = edev->mdev;
60946098
struct mlx5e_dev *mlx5e_dev;
60956099
struct net_device *netdev;
6096-
pm_message_t state = {};
60976100
struct mlx5e_priv *priv;
60986101
int err;
60996102

@@ -6148,7 +6151,7 @@ static int mlx5e_probe(struct auxiliary_device *adev,
61486151
return 0;
61496152

61506153
err_resume:
6151-
mlx5e_suspend(adev, state);
6154+
_mlx5e_suspend(adev);
61526155
err_profile_cleanup:
61536156
profile->cleanup(priv);
61546157
err_destroy_netdev:
@@ -6160,16 +6163,21 @@ static int mlx5e_probe(struct auxiliary_device *adev,
61606163
return err;
61616164
}
61626165

6166+
static int mlx5e_probe(struct auxiliary_device *adev,
6167+
const struct auxiliary_device_id *id)
6168+
{
6169+
return _mlx5e_probe(adev);
6170+
}
6171+
61636172
static void mlx5e_remove(struct auxiliary_device *adev)
61646173
{
61656174
struct mlx5e_dev *mlx5e_dev = auxiliary_get_drvdata(adev);
61666175
struct mlx5e_priv *priv = mlx5e_dev->priv;
6167-
pm_message_t state = {};
61686176

61696177
mlx5_core_uplink_netdev_set(priv->mdev, NULL);
61706178
mlx5e_dcbnl_delete_app(priv);
61716179
unregister_netdev(priv->netdev);
6172-
mlx5e_suspend(adev, state);
6180+
_mlx5e_suspend(adev);
61736181
priv->profile->cleanup(priv);
61746182
mlx5e_destroy_netdev(priv);
61756183
mlx5e_devlink_port_unregister(mlx5e_dev);

0 commit comments

Comments
 (0)