From patchwork Fri Dec 6 15:42:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Jensen X-Patchwork-Id: 3298741 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BD745C0D4A for ; Fri, 6 Dec 2013 15:43:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2EBA1204D1 for ; Fri, 6 Dec 2013 15:43:03 +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 7E105204AF for ; Fri, 6 Dec 2013 15:43:01 +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 1VoxYP-0003rR-83; Fri, 06 Dec 2013 15:42:57 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VoxYM-00019y-Lx; Fri, 06 Dec 2013 15:42:54 +0000 Received: from mail-la0-x231.google.com ([2a00:1450:4010:c03::231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VoxYJ-00018d-Nb for linux-arm-kernel@lists.infradead.org; Fri, 06 Dec 2013 15:42:52 +0000 Received: by mail-la0-f49.google.com with SMTP id er20so344033lab.8 for ; Fri, 06 Dec 2013 07:42:29 -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; bh=PQ3Pg7QIC3cIFVQ55hLUJhepZxeieHwYRjriI1xodLo=; b=Ft8klF0wakE8oxrHv1Wje7AB7sQ3+/fYjTIBYtBATGH43cRtLhuFNGBxdBDakMWYnV oOmztumJkLzzfbYs2VxzNkqI3uQlQJKKvsFurcnCd3G1UOKGuRRISCFoJbWKXEBupNY6 1dB2e2Y0KvOedUJOQbN8qcuJ9b+V4siVdUpQce/EqAUuaHwktEMbETc9N2NKJ9nr5UAi ++mdnqUuGagVxTSjLwoH81y0fy3+xCjYtSKxE8Khule1pQjdgYwyNjpj10arMvJ0+K3g a5Bmy8tRXt2fibyORbcP7suW8Zgx5Ngel/+KMKO/ENHWI/GvQkYJNiYCx3t5bAG93D97 VIcw== X-Received: by 10.112.185.67 with SMTP id fa3mr1060006lbc.28.1386344549483; Fri, 06 Dec 2013 07:42:29 -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 c8sm49347318lag.3.2013.12.06.07.42.27 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 06 Dec 2013 07:42:28 -0800 (PST) From: Jonas Jensen To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] dma: fix vchan_cookie_complete() debug print Date: Fri, 6 Dec 2013 16:42:09 +0100 Message-Id: <1386344529-25617-1-git-send-email-jonas.jensen@gmail.com> X-Mailer: git-send-email 1.8.2.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131206_104251_925389_F525F8AD X-CRM114-Status: UNSURE ( 8.95 ) 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.3 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=unavailable 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 vd->tx.cookie is set zero on dma_cookie_complete(), save to local before printing it. Signed-off-by: Jonas Jensen --- Notes: dev_vdbg() could also be moved to happen earlier, what do you prefer? Applies to next-20131206 drivers/dma/virt-dma.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/virt-dma.h b/drivers/dma/virt-dma.h index 85c19d6..181b9526 100644 --- a/drivers/dma/virt-dma.h +++ b/drivers/dma/virt-dma.h @@ -84,10 +84,12 @@ static inline bool vchan_issue_pending(struct virt_dma_chan *vc) static inline void vchan_cookie_complete(struct virt_dma_desc *vd) { struct virt_dma_chan *vc = to_virt_chan(vd->tx.chan); + dma_cookie_t cookie; + cookie = vd->tx.cookie; dma_cookie_complete(&vd->tx); dev_vdbg(vc->chan.device->dev, "txd %p[%x]: marked complete\n", - vd, vd->tx.cookie); + vd, cookie); list_add_tail(&vd->node, &vc->desc_completed); tasklet_schedule(&vc->task);