From: Wei Yongjun Date: Wed, 5 Sep 2012 06:42:48 +0000 (+0800) Subject: target: use list_move_tail instead of list_del/list_add_tail X-Git-Tag: v3.7-rc1~61^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf11eefcb1dc1326341ebdc44566ad08bee3f539;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git target: use list_move_tail instead of list_del/list_add_tail Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Nicholas Bellinger --- diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c index 4d97977..0ce44cd 100644 --- a/drivers/target/sbp/sbp_target.c +++ b/drivers/target/sbp/sbp_target.c @@ -660,8 +660,7 @@ static void session_reconnect_expired(struct sbp_session *sess) spin_lock_bh(&sess->lock); list_for_each_entry_safe(login, temp, &sess->login_list, link) { login->sess = NULL; - list_del(&login->link); - list_add_tail(&login->link, &login_list); + list_move_tail(&login->link, &login_list); } spin_unlock_bh(&sess->lock);