Skip to content

Commit b1a33e6

Browse files
Tariq ToukanSaeed Mahameed
authored andcommitted
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>
1 parent c909eec commit b1a33e6

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
@@ -5984,7 +5984,7 @@ static int mlx5e_resume(struct auxiliary_device *adev)
59845984
return 0;
59855985
}
59865986

5987-
static int mlx5e_suspend(struct auxiliary_device *adev, pm_message_t state)
5987+
static int _mlx5e_suspend(struct auxiliary_device *adev)
59885988
{
59895989
struct mlx5e_dev *mlx5e_dev = auxiliary_get_drvdata(adev);
59905990
struct mlx5e_priv *priv = mlx5e_dev->priv;
@@ -6002,15 +6002,18 @@ static int mlx5e_suspend(struct auxiliary_device *adev, pm_message_t state)
60026002
return 0;
60036003
}
60046004

6005-
static int mlx5e_probe(struct auxiliary_device *adev,
6006-
const struct auxiliary_device_id *id)
6005+
static int mlx5e_suspend(struct auxiliary_device *adev, pm_message_t state)
6006+
{
6007+
return _mlx5e_suspend(adev);
6008+
}
6009+
6010+
static int _mlx5e_probe(struct auxiliary_device *adev)
60076011
{
60086012
struct mlx5_adev *edev = container_of(adev, struct mlx5_adev, adev);
60096013
const struct mlx5e_profile *profile = &mlx5e_nic_profile;
60106014
struct mlx5_core_dev *mdev = edev->mdev;
60116015
struct mlx5e_dev *mlx5e_dev;
60126016
struct net_device *netdev;
6013-
pm_message_t state = {};
60146017
struct mlx5e_priv *priv;
60156018
int err;
60166019

@@ -6065,7 +6068,7 @@ static int mlx5e_probe(struct auxiliary_device *adev,
60656068
return 0;
60666069

60676070
err_resume:
6068-
mlx5e_suspend(adev, state);
6071+
_mlx5e_suspend(adev);
60696072
err_profile_cleanup:
60706073
profile->cleanup(priv);
60716074
err_destroy_netdev:
@@ -6077,16 +6080,21 @@ static int mlx5e_probe(struct auxiliary_device *adev,
60776080
return err;
60786081
}
60796082

6083+
static int mlx5e_probe(struct auxiliary_device *adev,
6084+
const struct auxiliary_device_id *id)
6085+
{
6086+
return _mlx5e_probe(adev);
6087+
}
6088+
60806089
static void mlx5e_remove(struct auxiliary_device *adev)
60816090
{
60826091
struct mlx5e_dev *mlx5e_dev = auxiliary_get_drvdata(adev);
60836092
struct mlx5e_priv *priv = mlx5e_dev->priv;
6084-
pm_message_t state = {};
60856093

60866094
mlx5_core_uplink_netdev_set(priv->mdev, NULL);
60876095
mlx5e_dcbnl_delete_app(priv);
60886096
unregister_netdev(priv->netdev);
6089-
mlx5e_suspend(adev, state);
6097+
_mlx5e_suspend(adev);
60906098
priv->profile->cleanup(priv);
60916099
mlx5e_destroy_netdev(priv);
60926100
mlx5e_devlink_port_unregister(mlx5e_dev);

0 commit comments

Comments
 (0)