From patchwork Mon Dec 9 09:25:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Jensen X-Patchwork-Id: 3309641 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F28B09F37A for ; Mon, 9 Dec 2013 09:26:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E1B920123 for ; Mon, 9 Dec 2013 09:26:36 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 52A792011B for ; Mon, 9 Dec 2013 09:26:35 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vpx6Z-0005eE-1o; Mon, 09 Dec 2013 09:26:19 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vpx6W-0008Kc-Az; Mon, 09 Dec 2013 09:26:16 +0000 Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vpx6T-0008JV-6n for linux-arm-kernel@lists.infradead.org; Mon, 09 Dec 2013 09:26:14 +0000 Received: by mail-la0-f53.google.com with SMTP id mc6so1084730lab.26 for ; Mon, 09 Dec 2013 01:25:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YesSvbEB2fwj1nHvfGPeL6OqXVB6FsT1cIg25dv+YD4=; b=llPFIYMyAgWwCEetXYOLGos8aDLliYievP1Q7Mp6urUNjPICehcL+UBHXUh558phyN jrNdNWV6Z15/fFk3S930gZ6zN6QDmlNYQY73MXaE3tAepGDOa9uUW5IFUy/tnwVJ0JRv vHg+XGgD4n12OfTA9iNdi+Upe61w0ML7ctxCzNixdeZJS4BDvsqE+KaBQ9+gb416uqJo uxxEC5btF7LCMIUr9n3vGcKcHTz2t0bT8h0X1ikI5WhMtHLQtbaEuS9Il8Zp4S3mSNQl XFdDTo2a3qAbJiHXQHrsErqbX6joJflXUHvHkjmgp8pIbqkA9jzrgZZBkWfJlljcWGfa eyhg== X-Received: by 10.152.23.3 with SMTP id i3mr690040laf.78.1386581145436; Mon, 09 Dec 2013 01:25:45 -0800 (PST) Received: from Ildjarn.ath.cx (static-213-115-41-10.sme.bredbandsbolaget.se. [213.115.41.10]) by mx.google.com with ESMTPSA id r10sm13149137lag.7.2013.12.09.01.25.43 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 09 Dec 2013 01:25:44 -0800 (PST) From: Jonas Jensen To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] dma: fix vchan_cookie_complete() debug print Date: Mon, 9 Dec 2013 10:25:23 +0100 Message-Id: <1386581123-4706-1-git-send-email-jonas.jensen@gmail.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1386344529-25617-1-git-send-email-jonas.jensen@gmail.com> References: <1386344529-25617-1-git-send-email-jonas.jensen@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131209_042613_419797_235DF30C X-CRM114-Status: UNSURE ( 9.51 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: vinod.koul@intel.com, dan.j.williams@intel.com, arm@kernel.org, linux-kernel@vger.kernel.org, Jonas Jensen X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP vchan_cookie_complete() is supposed to print the cookie value but it's always zero because: dma_cookie_complete() is called prior to dev_vdbg() Move the call, place it after dev_vdbg(). Signed-off-by: Jonas Jensen --- Notes: Changes since v1: 1. remove local dma_cookie_t 2. call dma_cookie_complete() after dev_vdbg() Applies to next-20131209 drivers/dma/virt-dma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/virt-dma.h b/drivers/dma/virt-dma.h index 85c19d6..7d6f611 100644 --- a/drivers/dma/virt-dma.h +++ b/drivers/dma/virt-dma.h @@ -85,9 +85,9 @@ static inline void vchan_cookie_complete(struct virt_dma_desc *vd) { struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); - dma_cookie_complete(&vd->tx); dev_vdbg(vc->chan.device->dev, "txd %p[%x]: marked complete\n", vd, vd->tx.cookie); + dma_cookie_complete(&vd->tx); list_add_tail(&vd->node, &vc->desc_completed); tasklet_schedule(&vc->task);