linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ibmvnic: Use list_for_each_entry() to simplify code in ibmvnic.c
@ 2021-06-10 12:54 Wang Hai
  2021-06-10 14:52 ` Lijun Pan
  2021-06-10 21:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Wang Hai @ 2021-06-10 12:54 UTC (permalink / raw)
  To: davem, kuba, mpe, benh, paulus, drt, sukadev, tlfalcon
  Cc: linuxppc-dev, netdev, linux-kernel

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

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] ibmvnic: Use list_for_each_entry() to simplify code in ibmvnic.c
  2021-06-10 12:54 [PATCH net-next] ibmvnic: Use list_for_each_entry() to simplify code in ibmvnic.c Wang Hai
@ 2021-06-10 14:52 ` Lijun Pan
  2021-06-10 16:48   ` Dany Madden
  2021-06-10 21:10 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Lijun Pan @ 2021-06-10 14:52 UTC (permalink / raw)
  To: Wang Hai
  Cc: David S. Miller, Jakub Kicinski, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras, Dany Madden,
	Sukadev Bhattiprolu, Thomas Falcon, linuxppc-dev, netdev,
	linux-kernel

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

Acked-by: Lijun Pan <lijunp213@gmail.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] ibmvnic: Use list_for_each_entry() to simplify code in ibmvnic.c
  2021-06-10 14:52 ` Lijun Pan
@ 2021-06-10 16:48   ` Dany Madden
  0 siblings, 0 replies; 4+ messages in thread
From: Dany Madden @ 2021-06-10 16:48 UTC (permalink / raw)
  To: Lijun Pan
  Cc: Wang Hai, David S. Miller, Jakub Kicinski, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras, Sukadev Bhattiprolu,
	Thomas Falcon, linuxppc-dev, netdev, linux-kernel

On 2021-06-10 07:52, Lijun Pan wrote:
> On Thu, Jun 10, 2021 at 7:56 AM Wang Hai <wanghai38@huawei.com> wrote:
>> 
>> Convert list_for_each() to list_for_each_entry() where
>> applicable. This simplifies the code.
>> 
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Wang Hai <wanghai38@huawei.com>
>> ---
> 
> Acked-by: Lijun Pan <lijunp213@gmail.com>
Reviewed-by: Dany Madden <drt@linux.ibm.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] ibmvnic: Use list_for_each_entry() to simplify code in ibmvnic.c
  2021-06-10 12:54 [PATCH net-next] ibmvnic: Use list_for_each_entry() to simplify code in ibmvnic.c Wang Hai
  2021-06-10 14:52 ` Lijun Pan
@ 2021-06-10 21:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-10 21:10 UTC (permalink / raw)
  To: Wang Hai
  Cc: davem, kuba, mpe, benh, paulus, drt, sukadev, tlfalcon,
	linuxppc-dev, netdev, linux-kernel

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 <hulkci@huawei.com>
> Signed-off-by: Wang Hai <wanghai38@huawei.com>
> ---
>  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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-10 21:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 12:54 [PATCH net-next] ibmvnic: Use list_for_each_entry() to simplify code in ibmvnic.c Wang Hai
2021-06-10 14:52 ` Lijun Pan
2021-06-10 16:48   ` Dany Madden
2021-06-10 21:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).