From 157de229468b2a63bbc8f9a7d37c70a2c9731ac8 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Wed, 16 Apr 2008 21:09:26 -0700 Subject: [PATCH] IB: Use shorter list_splice_init() for brevity Convert list_splice() + INIT_LIST_HEAD() to the equivalent list_splice_init() Signed-off-by: Robert P. J. Day Signed-off-by: Roland Dreier --- drivers/infiniband/core/fmr_pool.c | 3 +-- drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c index 06d502c06a..1286dc1b98 100644 --- a/drivers/infiniband/core/fmr_pool.c +++ b/drivers/infiniband/core/fmr_pool.c @@ -158,8 +158,7 @@ static void ib_fmr_batch_release(struct ib_fmr_pool *pool) #endif } - list_splice(&pool->dirty_list, &unmap_list); - INIT_LIST_HEAD(&pool->dirty_list); + list_splice_init(&pool->dirty_list, &unmap_list); pool->dirty_len = 0; spin_unlock_irq(&pool->pool_lock); diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 329b4675ae..d87f53190a 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -359,8 +359,7 @@ void ipoib_flush_paths(struct net_device *dev) spin_lock_irq(&priv->tx_lock); spin_lock(&priv->lock); - list_splice(&priv->path_list, &remove_list); - INIT_LIST_HEAD(&priv->path_list); + list_splice_init(&priv->path_list, &remove_list); list_for_each_entry(path, &remove_list, list) rb_erase(&path->rb_node, &priv->path_tree); -- 2.39.5