From patchwork Wed Sep 5 06:53:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1405611 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id B5E92DF28C for ; Wed, 5 Sep 2012 06:56:39 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T99Un-0003gX-29; Wed, 05 Sep 2012 06:53:53 +0000 Received: from mail-qa0-f42.google.com ([209.85.216.42]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T99Ui-0003g6-Lg for linux-arm-kernel@lists.infradead.org; Wed, 05 Sep 2012 06:53:50 +0000 Received: by qaeb19 with SMTP id b19so4072929qae.15 for ; Tue, 04 Sep 2012 23:53:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=ADC01HaUOCx5nzK5LswVXodCbhy04XcEVQ6kUn9LSvE=; b=T9EVuyhLn8bhcDhwh3Ht8CtD2xWR698PbQ0+fIXkoK+WJA/a6RPSb45CkQlBjkiWa+ DNE0vcUbxXU8mKR6nuA33sMbySTj80UvgvKpB4Ykclh02NFA2NscsMYF0yYC8VYrTiqA glmoiit3vj3FQvoSlQg/1AJbr3EiDCb5aNMYl+DrOkHqxm7sKLwNG2ET7TIAw4wK80SM O0MQRpCUhOw/8bjgaxu/G4kFoGrfyoV/p4zKGVlwU2UbTwOzgLC/krhgAgxmz/c5QzIs wRIi5+bVqRwBkbkvzm983bG7ITddJW7BrbBTDGCfLChZMP2GHrO1K+J9z2clM5VNFhuq KOmg== MIME-Version: 1.0 Received: by 10.224.185.15 with SMTP id cm15mr43987404qab.8.1346828026879; Tue, 04 Sep 2012 23:53:46 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Tue, 4 Sep 2012 23:53:46 -0700 (PDT) Date: Wed, 5 Sep 2012 14:53:46 +0800 Message-ID: Subject: [PATCH] [ARM] msm: dma: use list_move_tail instead of list_del/list_add_tail From: Wei Yongjun To: davidb@codeaurora.org, dwalker@fifo99.com, bryanh@codeaurora.org, linux@arm.linux.org.uk X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (weiyj.lk[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.216.42 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: linux-arm-msm@vger.kernel.org, yongjun_wei@trendmicro.com.cn, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Wei Yongjun 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 --- arch/arm/mach-msm/dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/mach-msm/dma.c b/arch/arm/mach-msm/dma.c index 02cae5e..354b91d 100644 --- a/arch/arm/mach-msm/dma.c +++ b/arch/arm/mach-msm/dma.c @@ -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);