All of lore.kernel.org
 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

* Re: [PATCH] [SCSI] libfcoe: use list_move instead of list_del/list_add
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Love, Robert W @ 2012-09-06 15:45 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: JBottomley, yongjun_wei, devel, linux-scsi

On 9/5/2012 9:36 PM, Wei Yongjun wrote:
> 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>
Acked-by: Robert Love <robert.w.love@intel.com>


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

* RE: [PATCH] [SCSI] libfcoe: use list_move instead of list_del/list_add
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Zou, Yi @ 2012-09-10 18:07 UTC (permalink / raw)
  To: Wei Yongjun, Love, Robert W, 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))
> 

Looks good to me, thanks,

Reviewed-by: Yi Zou <yi.zou@intel.com>




^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.