diff options
author | Akinobu Mita <mita@miraclelinux.com> | 2006-06-26 03:24:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 12:58:18 -0400 |
commit | 179e09172ab663b8587ecc46bb18a56a770304a9 (patch) | |
tree | 4d57324584c43f81ac2a6d258bb46e75fb6b4327 /drivers/infiniband/core | |
parent | a842ef297fd91b1b93f2aa5898d2efd19e95f6a5 (diff) |
[PATCH] drivers: use list_move()
This patch converts the combination of list_del(A) and list_add(A, B) to
list_move(A, B) under drivers/.
Acked-by: Corey Minyard <minyard@mvista.com>
Cc: Ben Collins <bcollins@debian.org>
Acked-by: Roland Dreier <rolandd@cisco.com>
Cc: Alasdair Kergon <dm-devel@redhat.com>
Cc: Gerd Knorr <kraxel@bytesex.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frank Pavlic <fpavlic@de.ibm.com>
Acked-by: Matthew Wilcox <matthew@wil.cx>
Cc: Andrew Vasquez <linux-driver@qlogic.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/mad.c | 9 | ||||
-rw-r--r-- | drivers/infiniband/core/mad_rmpp.c | 3 |
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index b38e02a5db35..5ed4dab52a6f 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -1775,11 +1775,9 @@ ib_find_send_mad(struct ib_mad_agent_private *mad_agent_priv, | |||
1775 | void ib_mark_mad_done(struct ib_mad_send_wr_private *mad_send_wr) | 1775 | void ib_mark_mad_done(struct ib_mad_send_wr_private *mad_send_wr) |
1776 | { | 1776 | { |
1777 | mad_send_wr->timeout = 0; | 1777 | mad_send_wr->timeout = 0; |
1778 | if (mad_send_wr->refcount == 1) { | 1778 | if (mad_send_wr->refcount == 1) |
1779 | list_del(&mad_send_wr->agent_list); | 1779 | list_move_tail(&mad_send_wr->agent_list, |
1780 | list_add_tail(&mad_send_wr->agent_list, | ||
1781 | &mad_send_wr->mad_agent_priv->done_list); | 1780 | &mad_send_wr->mad_agent_priv->done_list); |
1782 | } | ||
1783 | } | 1781 | } |
1784 | 1782 | ||
1785 | static void ib_mad_complete_recv(struct ib_mad_agent_private *mad_agent_priv, | 1783 | static void ib_mad_complete_recv(struct ib_mad_agent_private *mad_agent_priv, |
@@ -2098,8 +2096,7 @@ retry: | |||
2098 | queued_send_wr = container_of(mad_list, | 2096 | queued_send_wr = container_of(mad_list, |
2099 | struct ib_mad_send_wr_private, | 2097 | struct ib_mad_send_wr_private, |
2100 | mad_list); | 2098 | mad_list); |
2101 | list_del(&mad_list->list); | 2099 | list_move_tail(&mad_list->list, &send_queue->list); |
2102 | list_add_tail(&mad_list->list, &send_queue->list); | ||
2103 | } | 2100 | } |
2104 | spin_unlock_irqrestore(&send_queue->lock, flags); | 2101 | spin_unlock_irqrestore(&send_queue->lock, flags); |
2105 | 2102 | ||
diff --git a/drivers/infiniband/core/mad_rmpp.c b/drivers/infiniband/core/mad_rmpp.c index d4704e054e30..ebcd5b181770 100644 --- a/drivers/infiniband/core/mad_rmpp.c +++ b/drivers/infiniband/core/mad_rmpp.c | |||
@@ -665,8 +665,7 @@ static void process_rmpp_ack(struct ib_mad_agent_private *agent, | |||
665 | goto out; | 665 | goto out; |
666 | 666 | ||
667 | mad_send_wr->refcount++; | 667 | mad_send_wr->refcount++; |
668 | list_del(&mad_send_wr->agent_list); | 668 | list_move_tail(&mad_send_wr->agent_list, |
669 | list_add_tail(&mad_send_wr->agent_list, | ||
670 | &mad_send_wr->mad_agent_priv->send_list); | 669 | &mad_send_wr->mad_agent_priv->send_list); |
671 | } | 670 | } |
672 | out: | 671 | out: |