[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y+5JEDnno1JwkCFC@boxer>
Date: Thu, 16 Feb 2023 16:17:39 +0100
From: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To: Saeed Mahameed <saeed@...nel.org>
CC: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>,
"Saeed Mahameed" <saeedm@...dia.com>, <netdev@...r.kernel.org>,
Tariq Toukan <tariqt@...dia.com>,
Parav Pandit <parav@...dia.com>, Shay Drory <shayd@...dia.com>
Subject: Re: [net-next 4/9] net/mlx5: Simplify eq list traversal
On Wed, Feb 15, 2023 at 04:09:13PM -0800, Saeed Mahameed wrote:
> From: Parav Pandit <parav@...dia.com>
>
> EQ list is read only while finding the matching EQ.
> Hence, avoid *_safe() version.
>
> Signed-off-by: Parav Pandit <parav@...dia.com>
> Reviewed-by: Shay Drory <shayd@...dia.com>
> Signed-off-by: Saeed Mahameed <saeedm@...dia.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/eq.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c
> index 66ec7932f008..38b32e98f3bd 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c
> @@ -960,11 +960,11 @@ static int vector2eqnirqn(struct mlx5_core_dev *dev, int vector, int *eqn,
> unsigned int *irqn)
> {
> struct mlx5_eq_table *table = dev->priv.eq_table;
> - struct mlx5_eq_comp *eq, *n;
> + struct mlx5_eq_comp *eq;
> int err = -ENOENT;
> int i = 0;
>
> - list_for_each_entry_safe(eq, n, &table->comp_eqs_list, list) {
> + list_for_each_entry(eq, &table->comp_eqs_list, list) {
> if (i++ == vector) {
> if (irqn)
> *irqn = eq->core.irqn;
> @@ -999,10 +999,10 @@ struct cpumask *
> mlx5_comp_irq_get_affinity_mask(struct mlx5_core_dev *dev, int vector)
> {
> struct mlx5_eq_table *table = dev->priv.eq_table;
> - struct mlx5_eq_comp *eq, *n;
> + struct mlx5_eq_comp *eq;
> int i = 0;
>
> - list_for_each_entry_safe(eq, n, &table->comp_eqs_list, list) {
> + list_for_each_entry(eq, &table->comp_eqs_list, list) {
> if (i++ == vector)
> break;
> }
> --
> 2.39.1
>
Powered by blists - more mailing lists