From patchwork Tue Sep 6 13:17:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9316791 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9C3B7601C0 for ; Tue, 6 Sep 2016 13:17:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8FF5528CCB for ; Tue, 6 Sep 2016 13:17:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8413F28D12; Tue, 6 Sep 2016 13:17:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.5 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3730E28D0B for ; Tue, 6 Sep 2016 13:17:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934195AbcIFNRu (ORCPT ); Tue, 6 Sep 2016 09:17:50 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:65451 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935282AbcIFNRs (ORCPT ); Tue, 6 Sep 2016 09:17:48 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0Lg4lz-1bIi8H1JUp-00pgGp; Tue, 06 Sep 2016 15:17:30 +0200 From: Arnd Bergmann To: Vinod Koul Cc: Arnd Bergmann , Dan Williams , Zhangfei Gao , John Stultz , Andy Green , Peter Griffin , Wei Yongjun , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: k3dma: use correct format string for debug output Date: Tue, 6 Sep 2016 15:17:49 +0200 Message-Id: <20160906131804.1961750-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:N6IWIy3hyaNH5bcX0wGIderSBZI7KHHYrxwu+qX1G/NzxX9+ckY lmKnWY/G6EhlTDUaVzpVZ+63hPxdQTeIN439yzamrI2+/vCzWSWKv+NqNUYMV5aWrnK7Jkg nBsEJRLtyFUO540DLpIzhUPEjerOVaOj+4grVi3x3EhkKt7yKwL9t/yrQip+kbFSaTyAXy0 7AC+Kc5jBJo7ZPdZ9qUJg== X-UI-Out-Filterresults: notjunk:1; V01:K0:HXtrpPkyJPE=:2KFxmpfufAXUQW+4z5Yqj/ sQYeFAGQC48bScO1Cw16OPkEzsz6S250J/p+udfV90+xLTV91h4NpIkF2y5vufUk/SmC/imYv BBABJKF8Q8/MDskUllUxGwaRWapxuoCflpu1o/KAFpD6Mx2TzpRkqVTtREe2Y7lW2UI3qszI3 2QrpRy2wi9sjW1bRFpGdoNJz+Wg1J2jo4Pg8u8XFu1YvSdAAEYShWwHaFaEtFRjnNibf5xtkf y8p1+QqIQsz/EsxrXfqwB/Cm9OKUk5cja+Pv54W74u/zW6vP7UoS2RW+nTf1tcO6FptCDjWnf K1gn6l4FJzMeVvuyyqWzhX19PcFwZyIuKRu+6hb7NIdwhRSJYYhCf3jzvz0jQOxwVVomIFtSz VrwEl8Hexya5yl3lsgeqbexiK/UQXGZU503jRgGR4RqfA3WVyZpHuSngA/oawPqKkzbMoShjx XA5KkLBrHjT6Y5CfzudjJTEQImg5LVNuyq3MNpil56LKz0eVAKfJggFFpxg3tjzhDPwGfDm8H YDyEnoHXvcvRZfSPNdG5f+WNMxmDjrA87bg3WxVGoZJO7OmmYeH2U1umSpPTuyMh5Uhs8iIZh Ki8UWKp8ruyeSwNt70yktqd73ry2z5dFdvPu9SRhBVcSEkKnQG5t8enDcthE3FMCG5BwxOjfa 7Ir/WevIWBg8Br+KLHGtiPR7OLJYwTIs3XoXXQlh2yPUJNZNKyXBqu/2nkAW5zRy+spo= Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The newly added k3_dma_prep_dma_cyclic function has some debug output that uses incorrect typecasts, some of which cause a warning like: drivers/dma/k3dma.c: In function 'k3_dma_prep_dma_cyclic': drivers/dma/k3dma.c:589:671: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] In general, we have to print 'dma_addr_t' values using special '%pad' format to get the correct behavior on kernels that have a 64-bit dma_addr_t type but 32-bit pointers. Similarly, printing size_t values should be done using the %z modifier to get the correct behavior on 64-bit kernels. Signed-off-by: Arnd Bergmann Fixes: a7e08fa6cc78 ("k3dma: Add cyclic mode for audio") --- drivers/dma/k3dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index 814e6e04e15c..aabcb7934b05 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -586,9 +586,9 @@ k3_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, size_t modulo = DMA_CYCLIC_MAX_PERIOD; u32 en_tc2 = 0; - dev_dbg(chan->device->dev, "%s: buf %p, dst %p, buf len %d, period_len = %d, dir %d\n", - __func__, (void *)buf_addr, (void *)to_k3_chan(chan)->dev_addr, - (int)buf_len, (int)period_len, (int)dir); + dev_dbg(chan->device->dev, "%s: buf %pad, dst %pad, buf len %zu, period_len = %zu, dir %d\n", + __func__, &buf_addr, &to_k3_chan(chan)->dev_addr, + buf_len, period_len, (int)dir); avail = buf_len; if (avail > modulo)