linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next v2] scsi: bfa: Use list_move_tail instead of list_del/list_add_tail in bfa_ioc.c
@ 2021-06-09  7:16 Baokun Li
  0 siblings, 0 replies; only message in thread
From: Baokun Li @ 2021-06-09  7:16 UTC (permalink / raw)
  To: linux-kernel, Anil Gurumurthy, Sudarsana Kalluru,
	James E.J. Bottomley, Martin K. Petersen
  Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3, libaokun1,
	linux-scsi, kernel-janitors, Hulk Robot

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

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
---
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;
 		}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-09  7:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09  7:16 [PATCH -next v2] scsi: bfa: Use list_move_tail instead of list_del/list_add_tail in bfa_ioc.c Baokun Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).