1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00

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: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
Wei Yongjun 2012-09-05 15:07:29 +08:00 committed by Kalle Valo
parent 527f657030
commit f08dbda25f

View file

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