Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f08dbda2 authored by Wei Yongjun's avatar Wei Yongjun Committed by Kalle Valo
Browse files

ath6kl: use list_move_tail instead of list_del/list_add_tail

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 527f6570
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -374,9 +374,8 @@ static enum htc_send_queue_result htc_try_send(struct htc_target *target,
				packet = list_first_entry(txq,
							  struct htc_packet,
							  list);
				list_del(&packet->list);
				/* insert into local queue */
				list_add_tail(&packet->list, &send_queue);
				/* move to local queue */
				list_move_tail(&packet->list, &send_queue);
			}

			/*
@@ -399,10 +398,9 @@ static enum htc_send_queue_result htc_try_send(struct htc_target *target,
					 * for cleanup */
				} else {
					/* callback wants to keep this packet,
					 * remove from caller's queue */
					list_del(&packet->list);
					/* put it in the send queue */
					list_add_tail(&packet->list,
					 * move from caller's queue to the send
					 * queue */
					list_move_tail(&packet->list,
						       &send_queue);
				}