Commit 1533b774 authored by Yang Yingliang's avatar Yang Yingliang Committed by Tony Nguyen

ice: use list_for_each_entry() helper

Convert list_for_each() to list_for_each_entry() where applicable.
No functional changed.
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Tested-by: default avatarSujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 467a17ee
......@@ -129,11 +129,9 @@ ice_lag_find_hw_by_lport(struct ice_lag *lag, u8 lport)
struct ice_lag_netdev_list *entry;
struct net_device *tmp_netdev;
struct ice_netdev_priv *np;
struct list_head *tmp;
struct ice_hw *hw;
list_for_each(tmp, lag->netdev_head) {
entry = list_entry(tmp, struct ice_lag_netdev_list, node);
list_for_each_entry(entry, lag->netdev_head, node) {
tmp_netdev = entry->netdev;
if (!tmp_netdev || !netif_is_ice(tmp_netdev))
continue;
......@@ -1535,11 +1533,9 @@ static void ice_lag_disable_sriov_bond(struct ice_lag *lag)
struct ice_lag_netdev_list *entry;
struct ice_netdev_priv *np;
struct net_device *netdev;
struct list_head *tmp;
struct ice_pf *pf;
list_for_each(tmp, lag->netdev_head) {
entry = list_entry(tmp, struct ice_lag_netdev_list, node);
list_for_each_entry(entry, lag->netdev_head, node) {
netdev = entry->netdev;
np = netdev_priv(netdev);
pf = np->vsi->back;
......
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