Commit 31cf532a authored by Janani Ravichandran's avatar Janani Ravichandran Committed by Greg Kroah-Hartman

staging: lustre: lnet: Use list_entry() rather than container_of()

Use list_entry() rather than container_of() for nodes of doubly linked
lists.
Semantic patch used:

@A exists@
identifier var;
struct list_head *ptr;
@@

  var =
- container_of
+ list_entry
  (ptr, ...);
Signed-off-by: default avatarJanani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 11816434
...@@ -113,7 +113,7 @@ kiblnd_get_idle_tx(lnet_ni_t *ni, lnet_nid_t target) ...@@ -113,7 +113,7 @@ kiblnd_get_idle_tx(lnet_ni_t *ni, lnet_nid_t target)
node = kiblnd_pool_alloc_node(&tps->tps_poolset); node = kiblnd_pool_alloc_node(&tps->tps_poolset);
if (!node) if (!node)
return NULL; return NULL;
tx = container_of(node, kib_tx_t, tx_list); tx = list_entry(node, kib_tx_t, tx_list);
LASSERT(!tx->tx_nwrq); LASSERT(!tx->tx_nwrq);
LASSERT(!tx->tx_queued); LASSERT(!tx->tx_queued);
......
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