Commit 157de229 authored by Robert P. J. Day's avatar Robert P. J. Day Committed by Roland Dreier

IB: Use shorter list_splice_init() for brevity

Convert list_splice() + INIT_LIST_HEAD() to the equivalent list_splice_init()
Signed-off-by: default avatarRobert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 10f32065
...@@ -158,8 +158,7 @@ static void ib_fmr_batch_release(struct ib_fmr_pool *pool) ...@@ -158,8 +158,7 @@ static void ib_fmr_batch_release(struct ib_fmr_pool *pool)
#endif #endif
} }
list_splice(&pool->dirty_list, &unmap_list); list_splice_init(&pool->dirty_list, &unmap_list);
INIT_LIST_HEAD(&pool->dirty_list);
pool->dirty_len = 0; pool->dirty_len = 0;
spin_unlock_irq(&pool->pool_lock); spin_unlock_irq(&pool->pool_lock);
......
...@@ -359,8 +359,7 @@ void ipoib_flush_paths(struct net_device *dev) ...@@ -359,8 +359,7 @@ void ipoib_flush_paths(struct net_device *dev)
spin_lock_irq(&priv->tx_lock); spin_lock_irq(&priv->tx_lock);
spin_lock(&priv->lock); spin_lock(&priv->lock);
list_splice(&priv->path_list, &remove_list); list_splice_init(&priv->path_list, &remove_list);
INIT_LIST_HEAD(&priv->path_list);
list_for_each_entry(path, &remove_list, list) list_for_each_entry(path, &remove_list, list)
rb_erase(&path->rb_node, &priv->path_tree); rb_erase(&path->rb_node, &priv->path_tree);
......
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