2021-06-10 12:57:49

by Wang Hai

[permalink] [raw]
Subject: [PATCH net-next] ibmvnic: Use list_for_each_entry() to simplify code in ibmvnic.c

Convert list_for_each() to list_for_each_entry() where
applicable. This simplifies the code.

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Wang Hai <[email protected]>
---
drivers/net/ethernet/ibm/ibmvnic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 5788bb956d73..77ab381a67a3 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2402,8 +2402,7 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter,
goto err;
}

- list_for_each(entry, &adapter->rwi_list) {
- tmp = list_entry(entry, struct ibmvnic_rwi, list);
+ list_for_each_entry(tmp, &adapter->rwi_list, list) {
if (tmp->reset_reason == reason) {
netdev_dbg(netdev, "Skipping matching reset, reason=%s\n",
reset_reason_to_string(reason));
--
2.17.1


2021-06-10 14:54:27

by Lijun Pan

[permalink] [raw]
Subject: Re: [PATCH net-next] ibmvnic: Use list_for_each_entry() to simplify code in ibmvnic.c

On Thu, Jun 10, 2021 at 7:56 AM Wang Hai <[email protected]> wrote:
>
> Convert list_for_each() to list_for_each_entry() where
> applicable. This simplifies the code.
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Wang Hai <[email protected]>
> ---

Acked-by: Lijun Pan <[email protected]>

2021-06-10 16:50:50

by Dany Madden

[permalink] [raw]
Subject: Re: [PATCH net-next] ibmvnic: Use list_for_each_entry() to simplify code in ibmvnic.c

On 2021-06-10 07:52, Lijun Pan wrote:
> On Thu, Jun 10, 2021 at 7:56 AM Wang Hai <[email protected]> wrote:
>>
>> Convert list_for_each() to list_for_each_entry() where
>> applicable. This simplifies the code.
>>
>> Reported-by: Hulk Robot <[email protected]>
>> Signed-off-by: Wang Hai <[email protected]>
>> ---
>
> Acked-by: Lijun Pan <[email protected]>
Reviewed-by: Dany Madden <[email protected]>

2021-06-10 21:14:18

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH net-next] ibmvnic: Use list_for_each_entry() to simplify code in ibmvnic.c

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Thu, 10 Jun 2021 20:54:17 +0800 you wrote:
> Convert list_for_each() to list_for_each_entry() where
> applicable. This simplifies the code.
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Wang Hai <[email protected]>
> ---
> drivers/net/ethernet/ibm/ibmvnic.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

Here is the summary with links:
- [net-next] ibmvnic: Use list_for_each_entry() to simplify code in ibmvnic.c
https://git.kernel.org/netdev/net-next/c/3e98ae0014cb

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html