All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [SCSI] lpfc 8.3.32: use list_move_tail instead of list_del/list_add_tail
@ 2012-09-05  6:49 Wei Yongjun
  2012-09-10 17:31 ` James Smart
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2012-09-05  6:49 UTC (permalink / raw)
  To: james.smart, JBottomley; +Cc: yongjun_wei, linux-scsi

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

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 <yongjun_wei@trendmicro.com.cn>
---
 drivers/scsi/lpfc/lpfc_sli.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 9cbd20b..0ada66b 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -15833,8 +15833,7 @@ lpfc_cleanup_pending_mbox(struct lpfc_vport *vport)
 			(mb->u.mb.mbxCommand != MBX_REG_VPI))
 			continue;
 
-		list_del(&mb->list);
-		list_add_tail(&mb->list, &mbox_cmd_list);
+		list_move_tail(&mb->list, &mbox_cmd_list);
 	}
 	/* Clean up active mailbox command with the vport */
 	mb = phba->sli.mbox_active;



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

* Re: [PATCH] [SCSI] lpfc 8.3.32: use list_move_tail instead of list_del/list_add_tail
  2012-09-05  6:49 [PATCH] [SCSI] lpfc 8.3.32: use list_move_tail instead of list_del/list_add_tail Wei Yongjun
@ 2012-09-10 17:31 ` James Smart
  0 siblings, 0 replies; 2+ messages in thread
From: James Smart @ 2012-09-10 17:31 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: JBottomley, yongjun_wei, linux-scsi

Acked-by: James Smart <james.smart@emulex.com>

Thanks

-- james  s




On 9/5/2012 2:49 AM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> 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 <yongjun_wei@trendmicro.com.cn>
> ---
>   drivers/scsi/lpfc/lpfc_sli.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
> index 9cbd20b..0ada66b 100644
> --- a/drivers/scsi/lpfc/lpfc_sli.c
> +++ b/drivers/scsi/lpfc/lpfc_sli.c
> @@ -15833,8 +15833,7 @@ lpfc_cleanup_pending_mbox(struct lpfc_vport *vport)
>   			(mb->u.mb.mbxCommand != MBX_REG_VPI))
>   			continue;
>   
> -		list_del(&mb->list);
> -		list_add_tail(&mb->list, &mbox_cmd_list);
> +		list_move_tail(&mb->list, &mbox_cmd_list);
>   	}
>   	/* Clean up active mailbox command with the vport */
>   	mb = phba->sli.mbox_active;
>
>
>


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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05  6:49 [PATCH] [SCSI] lpfc 8.3.32: use list_move_tail instead of list_del/list_add_tail Wei Yongjun
2012-09-10 17:31 ` James Smart

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.