* [PATCH net-next v2] net: hns3: use list_move_tail instead of list_del/list_add_tail in hclgevf_main.c
@ 2021-06-09 7:17 Baokun Li
2021-06-09 21:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Baokun Li @ 2021-06-09 7:17 UTC (permalink / raw)
To: linux-kernel, Yisen Zhuang, Salil Mehta, David S. Miller,
Jakub Kicinski, Huazhong Tan, Guangbin Huang, Jian Shen,
Yufeng Mo, Guojia Liao, Jiaran Zhang
Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3, libaokun1, netdev,
kernel-janitors, Hulk Robot
Using list_move_tail() instead of list_del() + list_add_tail() in hclgevf_main.c.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
---
V1->V2:
CC mailist
.../hisilicon/hns3/hns3vf/hclgevf_main.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
index f84b3a135c06..52eaf82b7cd7 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
@@ -1536,8 +1536,7 @@ static void hclgevf_sync_from_add_list(struct list_head *add_list,
kfree(mac_node);
} else if (mac_node->state == HCLGEVF_MAC_ACTIVE) {
mac_node->state = HCLGEVF_MAC_TO_DEL;
- list_del(&mac_node->node);
- list_add_tail(&mac_node->node, mac_list);
+ list_move_tail(&mac_node->node, mac_list);
} else {
list_del(&mac_node->node);
kfree(mac_node);
@@ -1562,8 +1561,7 @@ static void hclgevf_sync_from_del_list(struct list_head *del_list,
list_del(&mac_node->node);
kfree(mac_node);
} else {
- list_del(&mac_node->node);
- list_add_tail(&mac_node->node, mac_list);
+ list_move_tail(&mac_node->node, mac_list);
}
}
}
@@ -1599,8 +1597,7 @@ static void hclgevf_sync_mac_list(struct hclgevf_dev *hdev,
list_for_each_entry_safe(mac_node, tmp, list, node) {
switch (mac_node->state) {
case HCLGEVF_MAC_TO_DEL:
- list_del(&mac_node->node);
- list_add_tail(&mac_node->node, &tmp_del_list);
+ list_move_tail(&mac_node->node, &tmp_del_list);
break;
case HCLGEVF_MAC_TO_ADD:
new_node = kzalloc(sizeof(*new_node), GFP_ATOMIC);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next v2] net: hns3: use list_move_tail instead of list_del/list_add_tail in hclgevf_main.c
2021-06-09 7:17 [PATCH net-next v2] net: hns3: use list_move_tail instead of list_del/list_add_tail in hclgevf_main.c Baokun Li
@ 2021-06-09 21:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-09 21:10 UTC (permalink / raw)
To: Baokun Li
Cc: linux-kernel, yisen.zhuang, salil.mehta, davem, kuba,
tanhuazhong, huangguangbin2, shenjian15, moyufeng, liaoguojia,
zhangjiaran, weiyongjun1, yuehaibing, yangjihong1, yukuai3,
netdev, kernel-janitors, hulkci
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Wed, 9 Jun 2021 15:17:20 +0800 you wrote:
> Using list_move_tail() instead of list_del() + list_add_tail() in hclgevf_main.c.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Baokun Li <libaokun1@huawei.com>
> ---
> V1->V2:
> CC mailist
>
> [...]
Here is the summary with links:
- [net-next,v2] net: hns3: use list_move_tail instead of list_del/list_add_tail in hclgevf_main.c
https://git.kernel.org/netdev/net-next/c/49768ce98c2c
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] 2+ messages in thread
end of thread, other threads:[~2021-06-09 21:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 7:17 [PATCH net-next v2] net: hns3: use list_move_tail instead of list_del/list_add_tail in hclgevf_main.c Baokun Li
2021-06-09 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).