ARM: msm: dma: 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: David Brown <davidb@codeaurora.org>
This commit is contained in:
parent
3b5909deb3
commit
6eebf2de9e
|
@ -223,8 +223,7 @@ static irqreturn_t msm_datamover_irq_handler(int irq, void *dev_id)
|
||||||
PRINT_FLOW("msm_datamover_irq_handler id %d, status %x\n", id, ch_status);
|
PRINT_FLOW("msm_datamover_irq_handler id %d, status %x\n", id, ch_status);
|
||||||
if ((ch_status & DMOV_STATUS_CMD_PTR_RDY) && !list_empty(&ready_commands[id])) {
|
if ((ch_status & DMOV_STATUS_CMD_PTR_RDY) && !list_empty(&ready_commands[id])) {
|
||||||
cmd = list_entry(ready_commands[id].next, typeof(*cmd), list);
|
cmd = list_entry(ready_commands[id].next, typeof(*cmd), list);
|
||||||
list_del(&cmd->list);
|
list_move_tail(&cmd->list, &active_commands[id]);
|
||||||
list_add_tail(&cmd->list, &active_commands[id]);
|
|
||||||
if (cmd->execute_func)
|
if (cmd->execute_func)
|
||||||
cmd->execute_func(cmd);
|
cmd->execute_func(cmd);
|
||||||
PRINT_FLOW("msm_datamover_irq_handler id %d, start command\n", id);
|
PRINT_FLOW("msm_datamover_irq_handler id %d, start command\n", id);
|
||||||
|
|
Loading…
Reference in a new issue