All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] HID: intel-ish-hid: use list_move_tail instead of list_del/list_add_tail
@ 2016-08-21 15:27 Wei Yongjun
  2016-08-26 19:04 ` Srinivas Pandruvada
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-08-21 15:27 UTC (permalink / raw)
  To: Srinivas Pandruvada, Jiri Kosina, Benjamin Tissoires
  Cc: Wei Yongjun, linux-input

From: Wei Yongjun <weiyongjun1@huawei.com>

Using list_move_tail() instead of list_del() + list_add_tail().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/hid/intel-ish-hid/ipc/ipc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/hid/intel-ish-hid/ipc/ipc.c b/drivers/hid/intel-ish-hid/ipc/ipc.c
index 851029b..e2517c1 100644
--- a/drivers/hid/intel-ish-hid/ipc/ipc.c
+++ b/drivers/hid/intel-ish-hid/ipc/ipc.c
@@ -448,8 +448,7 @@ static int ish_fw_reset_handler(struct ishtp_device *dev)
 	spin_lock_irqsave(&dev->wr_processing_spinlock, flags);
 	list_for_each_entry_safe(processing, next,
 			&dev->wr_processing_list_head.link, link) {
-		list_del(&processing->link);
-		list_add_tail(&processing->link, &dev->wr_free_list_head.link);
+		list_move_tail(&processing->link, &dev->wr_free_list_head.link);
 	}
 	spin_unlock_irqrestore(&dev->wr_processing_spinlock, flags);
 




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

end of thread, other threads:[~2016-08-26 19:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-21 15:27 [PATCH -next] HID: intel-ish-hid: use list_move_tail instead of list_del/list_add_tail Wei Yongjun
2016-08-26 19:04 ` Srinivas Pandruvada

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.