From patchwork Mon Oct 8 12:33:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1565301 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9B84540135 for ; Mon, 8 Oct 2012 12:33:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752083Ab2JHMdb (ORCPT ); Mon, 8 Oct 2012 08:33:31 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:54249 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751845Ab2JHMda (ORCPT ); Mon, 8 Oct 2012 08:33:30 -0400 Received: by mail-qc0-f174.google.com with SMTP id d3so2796440qch.19 for ; Mon, 08 Oct 2012 05:33:30 -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=u4Xs1TaYy8exrcl2mApvET9c1F8/Btb9qtkQEoaLYMI=; b=JpL12ZJ4iqCv2bz/WFT2gyrIuOEzjQWwX3Euwl8SAlrhek9ufM6n3wEmxAx1Ah6M8T 8dsfkbpTpc7E6vJ1Zejb6sbfJdjBIKkCydWAU7nKk4m/uVrWqzD8pd2aAxHVAKJdJxQp Z+gfre3FL1uiinFi+QtZIliWEYuXjhIYfrYjfsFxtDyb0QQPU2K3Ctlcn3lDZG9LrU8i 7ahu7ampHQwGjnVd2INKNqOd0CJyNAo0gYcV3dCspI8ltytVNDzfFvkoqegHBLBIy4H5 NzPwT/jIbfUJx2CBTTcj2UQGq82a7jt7ovpv8PbW+26QekyJ5EyN2rLE12JsjLgob6pS Zh1A== MIME-Version: 1.0 Received: by 10.49.60.231 with SMTP id k7mr41137686qer.25.1349699609906; Mon, 08 Oct 2012 05:33:29 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Mon, 8 Oct 2012 05:33:29 -0700 (PDT) Date: Mon, 8 Oct 2012 20:33:29 +0800 Message-ID: Subject: [PATCH] cx23885: use list_move_tail instead of list_del/list_add_tail From: Wei Yongjun To: mchehab@infradead.org Cc: yongjun_wei@trendmicro.com.cn, linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Wei Yongjun Using list_move_tail() instead of list_del() + list_add_tail(). dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/media/pci/cx23885/cx23885-core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c index 697728f..4189d64 100644 --- a/drivers/media/pci/cx23885/cx23885-core.c +++ b/drivers/media/pci/cx23885/cx23885-core.c @@ -1516,8 +1516,7 @@ int cx23885_restart_queue(struct cx23885_tsport *port, buf = list_entry(q->queued.next, struct cx23885_buffer, vb.queue); if (NULL == prev) { - list_del(&buf->vb.queue); - list_add_tail(&buf->vb.queue, &q->active); + list_move_tail(&buf->vb.queue, &q->active); cx23885_start_dma(port, q, buf); buf->vb.state = VIDEOBUF_ACTIVE; buf->count = q->count++; @@ -1528,8 +1527,7 @@ int cx23885_restart_queue(struct cx23885_tsport *port, } else if (prev->vb.width == buf->vb.width && prev->vb.height == buf->vb.height && prev->fmt == buf->fmt) { - list_del(&buf->vb.queue); - list_add_tail(&buf->vb.queue, &q->active); + list_move_tail(&buf->vb.queue, &q->active); buf->vb.state = VIDEOBUF_ACTIVE; buf->count = q->count++; prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma);