Skip to content

Commit 3e98ae0

Browse files
Wang Haidavem330
authored andcommitted
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 <[email protected]> Signed-off-by: Wang Hai <[email protected]> Acked-by: Lijun Pan <[email protected]> Reviewed-by: Dany Madden <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bc831fa commit 3e98ae0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,8 +2400,7 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter,
24002400
goto err;
24012401
}
24022402

2403-
list_for_each(entry, &adapter->rwi_list) {
2404-
tmp = list_entry(entry, struct ibmvnic_rwi, list);
2403+
list_for_each_entry(tmp, &adapter->rwi_list, list) {
24052404
if (tmp->reset_reason == reason) {
24062405
netdev_dbg(netdev, "Skipping matching reset, reason=%s\n",
24072406
reset_reason_to_string(reason));

0 commit comments

Comments
 (0)