From patchwork Fri Dec 6 17:20:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 3299021 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 8F49DC0D4A for ; Fri, 6 Dec 2013 17:28:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AD6F42042C for ; Fri, 6 Dec 2013 17:28:37 +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 71ED72042B for ; Fri, 6 Dec 2013 17:28:36 +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 1VozCU-0002U4-4Z; Fri, 06 Dec 2013 17:28:26 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VozCR-0003td-GZ; Fri, 06 Dec 2013 17:28:23 +0000 Received: from mail-bk0-f52.google.com ([209.85.214.52]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VozCO-0003se-2Z for linux-arm-kernel@lists.infradead.org; Fri, 06 Dec 2013 17:28:21 +0000 Received: by mail-bk0-f52.google.com with SMTP id u14so411174bkz.11 for ; Fri, 06 Dec 2013 09:27:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=MUeMq2Vl3Diyg/64tNd3xJkuSzgwANIwdcpkK/oxcfw=; b=RoGLoZJPmQ0SSfHF4+jnE6gX1elbyiv3zZVlzz7e1vcxyNlVD0aV//0nQBO0OnY7++ zwI6m0KBwkPz5XZzAkH2NHhrsVaRd0HcfMW9sKgHYnsFV5JCyKgXx8ujfzPLEyOkSNVd Dx5iJfzSMfc0NjXzfMQpjb4uxNEPwRHciC7TsnGvUAOCe4/6VifD8GWHuZGsi1ydijmE PBHQpqKM5t0gM4hEdBBpRgRNW4iZ7gkVWS0sXapVyL4lPayXAfjUKWQegpCsFenxjIAK sDFY38/qtG6JoVglKJu0+PTHGOdnWo4n9da3hk6fKGyU7IG0sw5SJXMC/aSWvZC7OZ5c 1C3Q== X-Gm-Message-State: ALoCoQmCOxiU6wBglqZXqECjBZt6CNY6R+sHYkLcyJJKxDg7nu9I8HM0xSdaBpLnlk4uT6gEoWSf MIME-Version: 1.0 X-Received: by 10.204.56.201 with SMTP id z9mr1524589bkg.77.1386350453699; Fri, 06 Dec 2013 09:20:53 -0800 (PST) Received: by 10.205.44.200 with HTTP; Fri, 6 Dec 2013 09:20:53 -0800 (PST) In-Reply-To: <1386344529-25617-1-git-send-email-jonas.jensen@gmail.com> References: <1386344529-25617-1-git-send-email-jonas.jensen@gmail.com> Date: Fri, 6 Dec 2013 09:20:53 -0800 Message-ID: Subject: Re: [PATCH] dma: fix vchan_cookie_complete() debug print From: Dan Williams To: Jonas Jensen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131206_122820_237933_B55E4E9C X-CRM114-Status: GOOD ( 13.04 ) X-Spam-Score: -2.6 (--) Cc: Vinod Koul , arm@kernel.org, "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" 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: , 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.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 On Fri, Dec 6, 2013 at 7:42 AM, Jonas Jensen wrote: > 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); This is a bit smaller: diff --git a/drivers/dma/virt-dma.h b/drivers/dma/virt-dma.h index 85c19d63f9fb..7d6f611c7654 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);