RE: [PATCH] [SCSI] libfcoe: use list_move instead of list_del/list_add

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxxxx>
> ---
>  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@xxxxxxxxx>



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux