summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ibm
diff options
context:
space:
mode:
authorWang Hai <wanghai38@huawei.com>2021-06-10 15:54:17 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-11 00:08:09 +0300
commit3e98ae0014cb882a2989cf4465e2b26688d3608d (patch)
tree819892e89f506c0caa1a5339cad7362e1885fac3 /drivers/net/ethernet/ibm
parentbc831facf8a11e4e615dc67ae790325710bc1979 (diff)
downloadlinux-3e98ae0014cb882a2989cf4465e2b26688d3608d.tar.xz
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 <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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 4d439413f6d9..ffd26cdc7bcd 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -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));