linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [SCSI] libfcoe: use list_move instead of list_del/list_add
@ 2012-09-06  4:36 Wei Yongjun
  2012-09-06 15:45 ` Love, Robert W
  2012-09-10 18:07 ` Zou, Yi
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2012-09-06  4:36 UTC (permalink / raw)
  To: robert.w.love, JBottomley; +Cc: yongjun_wei, devel, linux-scsi

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Using list_move() instead of list_del() + list_add().

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/scsi/fcoe/fcoe_ctlr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index 2ebe03a..44b4d99 100644
--- a/drivers/scsi/fcoe/fcoe_ctlr.c
+++ b/drivers/scsi/fcoe/fcoe_ctlr.c
@@ -817,8 +817,7 @@ static unsigned long fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip)
 			 * fcoe_sysfs_fcf_del (which can sleep)
 			 * after the put_cpu().
 			 */
-			list_del(&fcf->list);
-			list_add(&fcf->list, &del_list);
+			list_move(&fcf->list, &del_list);
 			stats->VLinkFailureCount++;
 		} else {
 			if (time_after(next_timer, deadline))


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-10 18:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-06  4:36 [PATCH] [SCSI] libfcoe: use list_move instead of list_del/list_add Wei Yongjun
2012-09-06 15:45 ` Love, Robert W
2012-09-10 18:07 ` Zou, Yi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).