Skip to content

Commit 3ac0b6a

Browse files
paravmellanoxSaeed Mahameed
authored andcommitted
net/mlx5: Simplify eq list traversal
EQ list is read only while finding the matching EQ. Hence, avoid *_safe() version. Signed-off-by: Parav Pandit <[email protected]> Reviewed-by: Shay Drory <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Reviewed-by: Maciej Fijalkowski <[email protected]>
1 parent 9da5294 commit 3ac0b6a

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -960,11 +960,11 @@ static int vector2eqnirqn(struct mlx5_core_dev *dev, int vector, int *eqn,
960960
unsigned int *irqn)
961961
{
962962
struct mlx5_eq_table *table = dev->priv.eq_table;
963-
struct mlx5_eq_comp *eq, *n;
963+
struct mlx5_eq_comp *eq;
964964
int err = -ENOENT;
965965
int i = 0;
966966

967-
list_for_each_entry_safe(eq, n, &table->comp_eqs_list, list) {
967+
list_for_each_entry(eq, &table->comp_eqs_list, list) {
968968
if (i++ == vector) {
969969
if (irqn)
970970
*irqn = eq->core.irqn;
@@ -999,10 +999,10 @@ struct cpumask *
999999
mlx5_comp_irq_get_affinity_mask(struct mlx5_core_dev *dev, int vector)
10001000
{
10011001
struct mlx5_eq_table *table = dev->priv.eq_table;
1002-
struct mlx5_eq_comp *eq, *n;
1002+
struct mlx5_eq_comp *eq;
10031003
int i = 0;
10041004

1005-
list_for_each_entry_safe(eq, n, &table->comp_eqs_list, list) {
1005+
list_for_each_entry(eq, &table->comp_eqs_list, list) {
10061006
if (i++ == vector)
10071007
break;
10081008
}

0 commit comments

Comments
 (0)