diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-09-05 03:07:29 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-10-24 04:49:50 -0400 |
commit | f08dbda25f14d6b9c1ba131f65d0c32917733f6c (patch) | |
tree | 661f5c445e05eb3405e8ee4f971c275e35306939 /drivers | |
parent | 527f6570300980251e818e80865b437eefb4e5d3 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/htc_pipe.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/htc_pipe.c b/drivers/net/wireless/ath/ath6kl/htc_pipe.c index f9626c723693..ba6bd497b787 100644 --- a/drivers/net/wireless/ath/ath6kl/htc_pipe.c +++ b/drivers/net/wireless/ath/ath6kl/htc_pipe.c | |||
@@ -374,9 +374,8 @@ static enum htc_send_queue_result htc_try_send(struct htc_target *target, | |||
374 | packet = list_first_entry(txq, | 374 | packet = list_first_entry(txq, |
375 | struct htc_packet, | 375 | struct htc_packet, |
376 | list); | 376 | list); |
377 | list_del(&packet->list); | 377 | /* move to local queue */ |
378 | /* insert into local queue */ | 378 | list_move_tail(&packet->list, &send_queue); |
379 | list_add_tail(&packet->list, &send_queue); | ||
380 | } | 379 | } |
381 | 380 | ||
382 | /* | 381 | /* |
@@ -399,11 +398,10 @@ static enum htc_send_queue_result htc_try_send(struct htc_target *target, | |||
399 | * for cleanup */ | 398 | * for cleanup */ |
400 | } else { | 399 | } else { |
401 | /* callback wants to keep this packet, | 400 | /* callback wants to keep this packet, |
402 | * remove from caller's queue */ | 401 | * move from caller's queue to the send |
403 | list_del(&packet->list); | 402 | * queue */ |
404 | /* put it in the send queue */ | 403 | list_move_tail(&packet->list, |
405 | list_add_tail(&packet->list, | 404 | &send_queue); |
406 | &send_queue); | ||
407 | } | 405 | } |
408 | 406 | ||
409 | } | 407 | } |