Re: [PATCH 4/7] net/mlx5: drop unnecessary list_empty

2020-07-28 Thread Saeed Mahameed
On Mon, 2020-07-27 at 10:10 -0700, David Miller wrote: > From: Julia Lawall > Date: Sun, 26 Jul 2020 12:58:29 +0200 > > > list_for_each_entry is able to handle an empty list. > > The only effect of avoiding the loop is not initializing the > > index variable. > > Drop list_empty tests in cases wh

Re: [PATCH 4/7] net/mlx5: drop unnecessary list_empty

2020-07-27 Thread David Miller
From: Julia Lawall Date: Sun, 26 Jul 2020 12:58:29 +0200 > list_for_each_entry is able to handle an empty list. > The only effect of avoiding the loop is not initializing the > index variable. > Drop list_empty tests in cases where these variables are not > used. > > Note that list_for_each_entr

[PATCH 4/7] net/mlx5: drop unnecessary list_empty

2020-07-26 Thread Julia Lawall
list_for_each_entry is able to handle an empty list. The only effect of avoiding the loop is not initializing the index variable. Drop list_empty tests in cases where these variables are not used. Note that list_for_each_entry is defined in terms of list_first_entry, which indicates that it should