[PATCH -next v2] scsi: bfa: Use list_move_tail instead of list_del/list_add_tail in bfa_ioc.c

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

 



Using list_move_tail() instead of list_del() + list_add_tail() in bfa_ioc.c.

Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Signed-off-by: Baokun Li <libaokun1@xxxxxxxxxx>
---
V1->V2:
	CC mailist

 drivers/scsi/bfa/bfa_ioc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
index 5740302d83ac..077b052aef1a 100644
--- a/drivers/scsi/bfa/bfa_ioc.c
+++ b/drivers/scsi/bfa/bfa_ioc.c
@@ -3201,8 +3201,7 @@ bfa_timer_beat(struct bfa_timer_mod_s *mod)
 		elem = (struct bfa_timer_s *) qe;
 		if (elem->timeout <= BFA_TIMER_FREQ) {
 			elem->timeout = 0;
-			list_del(&elem->qe);
-			list_add_tail(&elem->qe, &timedout_q);
+			list_move_tail(&elem->qe, &timedout_q);
 		} else {
 			elem->timeout -= BFA_TIMER_FREQ;
 		}




[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