Skip to content

Commit fb928ac

Browse files
committed
net/mlx5e: Add wrapping for auxiliary_driver ops and remove unused args
jira LE-1907 cve CVE-2024-38608 Rebuild_History Non-Buildable kernel-5.14.0-427.33.1.el9_4 commit-author Tariq Toukan <tariqt@nvidia.com> commit b1a33e6 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> (cherry picked from commit b1a33e6) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 0fac892 commit fb928ac

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
@@ -6005,7 +6005,7 @@ static int mlx5e_resume(struct auxiliary_device *adev)
60056005
return 0;
60066006
}
60076007

6008-
static int mlx5e_suspend(struct auxiliary_device *adev, pm_message_t state)
6008+
static int _mlx5e_suspend(struct auxiliary_device *adev)
60096009
{
60106010
struct mlx5e_dev *mlx5e_dev = auxiliary_get_drvdata(adev);
60116011
struct mlx5e_priv *priv = mlx5e_dev->priv;
@@ -6023,15 +6023,18 @@ static int mlx5e_suspend(struct auxiliary_device *adev, pm_message_t state)
60236023
return 0;
60246024
}
60256025

6026-
static int mlx5e_probe(struct auxiliary_device *adev,
6027-
const struct auxiliary_device_id *id)
6026+
static int mlx5e_suspend(struct auxiliary_device *adev, pm_message_t state)
6027+
{
6028+
return _mlx5e_suspend(adev);
6029+
}
6030+
6031+
static int _mlx5e_probe(struct auxiliary_device *adev)
60286032
{
60296033
struct mlx5_adev *edev = container_of(adev, struct mlx5_adev, adev);
60306034
const struct mlx5e_profile *profile = &mlx5e_nic_profile;
60316035
struct mlx5_core_dev *mdev = edev->mdev;
60326036
struct mlx5e_dev *mlx5e_dev;
60336037
struct net_device *netdev;
6034-
pm_message_t state = {};
60356038
struct mlx5e_priv *priv;
60366039
int err;
60376040

@@ -6086,7 +6089,7 @@ static int mlx5e_probe(struct auxiliary_device *adev,
60866089
return 0;
60876090

60886091
err_resume:
6089-
mlx5e_suspend(adev, state);
6092+
_mlx5e_suspend(adev);
60906093
err_profile_cleanup:
60916094
profile->cleanup(priv);
60926095
err_destroy_netdev:
@@ -6098,16 +6101,21 @@ static int mlx5e_probe(struct auxiliary_device *adev,
60986101
return err;
60996102
}
61006103

6104+
static int mlx5e_probe(struct auxiliary_device *adev,
6105+
const struct auxiliary_device_id *id)
6106+
{
6107+
return _mlx5e_probe(adev);
6108+
}
6109+
61016110
static void mlx5e_remove(struct auxiliary_device *adev)
61026111
{
61036112
struct mlx5e_dev *mlx5e_dev = auxiliary_get_drvdata(adev);
61046113
struct mlx5e_priv *priv = mlx5e_dev->priv;
6105-
pm_message_t state = {};
61066114

61076115
mlx5_core_uplink_netdev_set(priv->mdev, NULL);
61086116
mlx5e_dcbnl_delete_app(priv);
61096117
unregister_netdev(priv->netdev);
6110-
mlx5e_suspend(adev, state);
6118+
_mlx5e_suspend(adev);
61116119
priv->profile->cleanup(priv);
61126120
mlx5e_destroy_netdev(priv);
61136121
mlx5e_devlink_port_unregister(mlx5e_dev);

0 commit comments

Comments
 (0)