From patchwork Thu Sep 12 04:38:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olof Johansson X-Patchwork-Id: 2875711 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 428269F476 for ; Thu, 12 Sep 2013 04:39:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 891FD20279 for ; Thu, 12 Sep 2013 04:39:49 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5D65B20251 for ; Thu, 12 Sep 2013 04:39:48 +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 1VJygx-0002cX-Qk; Thu, 12 Sep 2013 04:39:44 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VJygv-0002h5-LX; Thu, 12 Sep 2013 04:39:41 +0000 Received: from mail-pb0-f52.google.com ([209.85.160.52]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VJygs-0002g6-V8 for linux-arm-kernel@lists.infradead.org; Thu, 12 Sep 2013 04:39:39 +0000 Received: by mail-pb0-f52.google.com with SMTP id wz12so9983477pbc.25 for ; Wed, 11 Sep 2013 21:39:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=IhzMQcJpzcEK87F9737idMWWuWrFcE9q5nUAceaNuZI=; b=MAtEC4T2rkaYMEzYxAAQexfE5NVMmy5Lus6R35V5ZApHpOzVH9mUtOjgiyrpdiBeqX 23w+eeLSkQisUik7GamL9Xl5kUggAHvmWvS50OY+rztMekoa+psU0AKBP75msVa984Q8 69wa1MWBUsGWDokht4bl/uz0XdqnOASZXNxBXm13pynQnJxxMRWxitaVOLyzCBS8EGzJ VW4iFVTeD3gOslKs6PjJfAkk03fiyQFY9SGVsWkOJBLmeYJZH5tOw59jw0tV2K7Muia4 xXXiMp1R3k3knfMTyeQC9wyONhqsgVfXf8/Yz1NNA9EW3+AMcz7v9xk3ex4UCtJLzWi/ z4Tg== X-Gm-Message-State: ALoCoQkPVKRaGJMwshadoRb4/5T3joQ3QxIj5w8Zem7AlZSlXsf4INbzhyIo8sqtYEqYhAH+94DV X-Received: by 10.66.25.232 with SMTP id f8mr7333930pag.25.1378960757390; Wed, 11 Sep 2013 21:39:17 -0700 (PDT) Received: from quad.lixom.net (173-13-129-225-sfba.hfc.comcastbusiness.net. [173.13.129.225]) by mx.google.com with ESMTPSA id nv6sm1881652pbc.6.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Sep 2013 21:39:16 -0700 (PDT) From: Olof Johansson To: Dan Williams , Vinod Koul Subject: [PATCH] dma: use %pa to print dma_addr_t Date: Wed, 11 Sep 2013 21:38:30 -0700 Message-Id: <1378960710-15648-1-git-send-email-olof@lixom.net> X-Mailer: git-send-email 1.8.1.192.gc4361b8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130912_003939_163818_A87E431A X-CRM114-Status: GOOD ( 11.58 ) X-Spam-Score: -2.6 (--) Cc: Olof Johansson , Shawn Guo , 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: , 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=-5.0 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 This resolves some warnings seen when building with CONFIG_ARM_LPAE=y, since dma_addr_t might then be 64-bit: drivers/dma/imx-sdma.c:1092:3: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] drivers/dma/imx-sdma.c:1166:3: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] drivers/dma/imx-dma.c:579:3: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] drivers/dma/imx-dma.c:579:3: warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t' [-Wformat=] drivers/dma/imx-dma.c:593:4: warning: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'dma_addr_t' [-Wformat=] drivers/dma/imx-dma.c:603:4: warning: format '%x' expects argument of type 'unsigned int', but argument 9 has type 'dma_addr_t' [-Wformat=] drivers/dma/imx-dma.c:930:2: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] drivers/dma/imx-dma.c:930:2: warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t' [-Wformat=] drivers/dma/imx-dma.c:960:2: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=] drivers/dma/imx-dma.c:960:2: warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t' [-Wformat=] drivers/dma/ipu/ipu_idmac.c:1235:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=] Signed-off-by: Olof Johansson --- drivers/dma/imx-dma.c | 20 ++++++++++---------- drivers/dma/imx-sdma.c | 8 ++++---- drivers/dma/ipu/ipu_idmac.c | 6 ++++-- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index 78f8ca5..fcc8a12 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -576,9 +576,9 @@ static int imxdma_xfer_desc(struct imxdma_desc *d) imx_dmav1_writel(imxdma, d->len, DMA_CNTR(imxdmac->channel)); - dev_dbg(imxdma->dev, "%s channel: %d dest=0x%08x src=0x%08x " + dev_dbg(imxdma->dev, "%s channel: %d dest=%pa src=%pa " "dma_length=%d\n", __func__, imxdmac->channel, - d->dest, d->src, d->len); + &d->dest, &d->src, d->len); break; /* Cyclic transfer is the same as slave_sg with special sg configuration. */ @@ -591,9 +591,9 @@ static int imxdma_xfer_desc(struct imxdma_desc *d) DMA_CCR(imxdmac->channel)); dev_dbg(imxdma->dev, "%s channel: %d sg=%p sgcount=%d " - "total length=%d dev_addr=0x%08x (dev2mem)\n", + "total length=%d dev_addr=%pa (dev2mem)\n", __func__, imxdmac->channel, d->sg, d->sgcount, - d->len, imxdmac->per_address); + d->len, &imxdmac->per_address); } else if (d->direction == DMA_MEM_TO_DEV) { imx_dmav1_writel(imxdma, imxdmac->per_address, DMA_DAR(imxdmac->channel)); @@ -601,9 +601,9 @@ static int imxdma_xfer_desc(struct imxdma_desc *d) DMA_CCR(imxdmac->channel)); dev_dbg(imxdma->dev, "%s channel: %d sg=%p sgcount=%d " - "total length=%d dev_addr=0x%08x (mem2dev)\n", + "total length=%d dev_addr=%pa (mem2dev)\n", __func__, imxdmac->channel, d->sg, d->sgcount, - d->len, imxdmac->per_address); + d->len, &imxdmac->per_address); } else { dev_err(imxdma->dev, "%s channel: %d bad dma mode\n", __func__, imxdmac->channel); @@ -927,8 +927,8 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_memcpy( struct imxdma_engine *imxdma = imxdmac->imxdma; struct imxdma_desc *desc; - dev_dbg(imxdma->dev, "%s channel: %d src=0x%x dst=0x%x len=%d\n", - __func__, imxdmac->channel, src, dest, len); + dev_dbg(imxdma->dev, "%s channel: %d src=%pa dst=%pa len=%d\n", + __func__, imxdmac->channel, &src, &dest, len); if (list_empty(&imxdmac->ld_free) || imxdma_chan_is_doing_cyclic(imxdmac)) @@ -957,9 +957,9 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_interleaved( struct imxdma_engine *imxdma = imxdmac->imxdma; struct imxdma_desc *desc; - dev_dbg(imxdma->dev, "%s channel: %d src_start=0x%x dst_start=0x%x\n" + dev_dbg(imxdma->dev, "%s channel: %d src_start=%pa dst_start=%pa\n" " src_sgl=%s dst_sgl=%s numf=%d frame_size=%d\n", __func__, - imxdmac->channel, xt->src_start, xt->dst_start, + imxdmac->channel, &xt->src_start, &xt->dst_start, xt->src_sgl ? "true" : "false", xt->dst_sgl ? "true" : "false", xt->numf, xt->frame_size); diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index fc43603..b6946c5 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1089,8 +1089,8 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg( param &= ~BD_CONT; } - dev_dbg(sdma->dev, "entry %d: count: %d dma: 0x%08x %s%s\n", - i, count, sg->dma_address, + dev_dbg(sdma->dev, "entry %d: count: %d dma: %pa %s%s\n", + i, count, &sg->dma_address, param & BD_WRAP ? "wrap" : "", param & BD_INTR ? " intr" : ""); @@ -1163,8 +1163,8 @@ static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic( if (i + 1 == num_periods) param |= BD_WRAP; - dev_dbg(sdma->dev, "entry %d: count: %d dma: 0x%08x %s%s\n", - i, period_len, dma_addr, + dev_dbg(sdma->dev, "entry %d: count: %d dma: %pa %s%s\n", + i, period_len, &dma_addr, param & BD_WRAP ? "wrap" : "", param & BD_INTR ? " intr" : ""); diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c index cb9c0bc..7d893c0 100644 --- a/drivers/dma/ipu/ipu_idmac.c +++ b/drivers/dma/ipu/ipu_idmac.c @@ -1232,8 +1232,10 @@ static irqreturn_t idmac_interrupt(int irq, void *dev_id) desc = list_entry(ichan->queue.next, struct idmac_tx_desc, list); descnew = desc; - dev_dbg(dev, "IDMAC irq %d, dma 0x%08x, next dma 0x%08x, current %d, curbuf 0x%08x\n", - irq, sg_dma_address(*sg), sgnext ? sg_dma_address(sgnext) : 0, ichan->active_buffer, curbuf); + dev_dbg(dev, "IDMAC irq %d, dma %pa, next dma %pa, current %d, curbuf 0x%08x\n", + irq, &sg_dma_address(*sg), + sgnext ? &sg_dma_address(sgnext) : NULL, ichan->active_buffer, + curbuf); /* Find the descriptor of sgnext */ sgnew = idmac_sg_next(ichan, &descnew, *sg);