Commit 3e98ae00 authored by Wang Hai's avatar Wang Hai Committed by David S. Miller

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
Acked-by: default avatarLijun Pan <lijunp213@gmail.com>
Reviewed-by: default avatarDany Madden <drt@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bc831fac
......@@ -2400,8 +2400,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));
......
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