Commit 36861d1f authored by Wang Hai's avatar Wang Hai Committed by David S. Miller

net: qede: Use list_for_each_entry() to simplify code

Convert list_for_each() to list_for_each_entry() where
applicable. This simplifies the code.
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1c753652
......@@ -247,12 +247,10 @@ static struct qede_rdma_event_work *
qede_rdma_get_free_event_node(struct qede_dev *edev)
{
struct qede_rdma_event_work *event_node = NULL;
struct list_head *list_node = NULL;
bool found = false;
list_for_each(list_node, &edev->rdma_info.rdma_event_list) {
event_node = list_entry(list_node, struct qede_rdma_event_work,
list);
list_for_each_entry(event_node, &edev->rdma_info.rdma_event_list,
list) {
if (!work_pending(&event_node->work)) {
found = true;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment