]> Git Repo - linux.git/commitdiff
ARM: msm: dma: use list_move_tail instead of list_del/list_add_tail
authorWei Yongjun <[email protected]>
Wed, 5 Sep 2012 06:53:46 +0000 (14:53 +0800)
committerDavid Brown <[email protected]>
Thu, 13 Sep 2012 18:12:50 +0000 (11:12 -0700)
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 <[email protected]>
Signed-off-by: David Brown <[email protected]>
arch/arm/mach-msm/dma.c

index 02cae5e2951c2d8ebc6cade2c582d5bb37d25d54..354b91d4c3ac190da702970f6eac58bce3a74720 100644 (file)
@@ -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);
                        if ((ch_status & DMOV_STATUS_CMD_PTR_RDY) && !list_empty(&ready_commands[id])) {
                                cmd = list_entry(ready_commands[id].next, typeof(*cmd), list);
-                               list_del(&cmd->list);
-                               list_add_tail(&cmd->list, &active_commands[id]);
+                               list_move_tail(&cmd->list, &active_commands[id]);
                                if (cmd->execute_func)
                                        cmd->execute_func(cmd);
                                PRINT_FLOW("msm_datamover_irq_handler id %d, start command\n", id);
This page took 0.055047 seconds and 4 git commands to generate.