From patchwork Fri Aug 9 16:33:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11087295 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7B0B9746 for ; Fri, 9 Aug 2019 16:33:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65DC51FE82 for ; Fri, 9 Aug 2019 16:33:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59BB9200E7; Fri, 9 Aug 2019 16:33:58 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E5F421FE82 for ; Fri, 9 Aug 2019 16:33:57 +0000 (UTC) X-Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by groups.io with SMTP; Fri, 09 Aug 2019 09:33:57 -0700 X-Received: by mail.kernel.org (Postfix) id E204521743; Fri, 9 Aug 2019 16:33:56 +0000 (UTC) X-Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5F5B9214C6; Fri, 9 Aug 2019 16:33:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5F5B9214C6 X-Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MwQGj-1iCHo22V1R-00sLsu; Fri, 09 Aug 2019 18:33:43 +0200 From: Arnd Bergmann To: Linuxkernel+Patchwork-Soc via Email Integration Cc: Arnd Bergmann , Russell King , Dan Williams , Vinod Koul , Linus Walleij , Bartosz Golaszewski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org Subject: [PATCH 3/7] dma: iop-adma: use correct printk format strings Date: Fri, 9 Aug 2019 18:33:17 +0200 Message-Id: <20190809163334.489360-3-arnd@arndb.de> In-Reply-To: <20190809163334.489360-1-arnd@arndb.de> References: <20190809162956.488941-1-arnd@arndb.de> <20190809163334.489360-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:K2Gx1fY8Ljd2NDS0Jw6+u8SOqS2PIq6MXC+1tPMpqkPHMkN2W/I iUBsOGMIfYW0btXkuSVHgws6TSChnnyEjdPzKqoXg730XHuYfskdrup3mtEge1rLJ+RCNvQ GQbLW5G77AESmvtOHKekKJvRWjugWQADMHgElxGI6TZPj1M/u2a4Z8vgEVUsbkqZx9E69wR Q+AKv4g8mPLpqgrMovg+g== X-UI-Out-Filterresults: notjunk:1;V03:K0:QlJroodNYQw=:7aGy8w9I7kaBCshH9xaCjU wXcGD7f/tjxfwmYWN0zF6a6BNWSScNC/Is7ufjpFaHt2cDsuBKoX3K3cuXluPLwW6I3Qisz3m U+42mPjMLyNFXswlSWWkloOyq+wzFchxwUWpSBj7/RUTP4lyyyI371+rz3Wc3bFpy8G1XkncX LoovGzApYsKtu1YPo1rEDONjs4MydfqiVD6Wg32W2qIqY5K8vWcPuJBEK5Cb+0/efGgbsNQV7 V3wOvTjX70IxhULQLgAOMt2Bb4YJgU1rztLd+tOvjMRSAFBjDz/Zd7yLOvgx8lGvyRcQFrSh4 rWTbIxgkc8UNl+eNyAsDeUi8uOphzhhXMi9NhAm9eGpMfZ+X2VEEkWvst5wPCoK2BkgLtu9iX pz3uTyHAQmgP78WyaeDMfD2uTJdp0eqjnxj/uy9YlSZm8RVQqeM99+n9825SzW0xxl+GQvu0N UwMPpWclDbP+vbdalZWzI5/8G+R2l5XV7wknLNi/L47H7ak53NkcdoXB+EbsO9mVne++T9wmn dcjnvVDeJ9qTx7yl7+w4dLPEtykr+QZ2wNwJ3vCqyKeDwFVkNcGJjk36HA7Zigxn8acuLL603 M5dXoM+K4YhwfCd74Vhb5K7ND0GQ5kYbSogwdlOihfCjtVVqF51qXlKOnxfj02+v7s2e/sDsR pgZ94SPPF4hfRTom/6Acj8gyvdZq2e569om+DLW6j7bdszTGSgVGdr3oT+fRdUmHuG0RJ3tWd 18Cx/AYE/Vj++D0bSBIgCfsEps3UlwrZw+gGjg== Precedence: Bulk List-Unsubscribe: Sender: patchwork-soc@linux.kernel.org List-Id: Mailing-List: list patchwork-soc@linux.kernel.org; contact patchwork-soc+owner@linux.kernel.org Delivered-To: mailing list patchwork-soc@linux.kernel.org Reply-To: patchwork-soc+owner@linux.kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.kernel.org; q=dns/txt; s=20140610; t=1565368437; bh=f7n+oEdk4taBoS7g/kU4vjw9gqjBEPCxeULpYD3Losg=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=vvj0KIHxfsjJAXXEpnxrUKXAGTPboUs3S9S3rwd3AQhr2wpSlasramWKR2f5RVyA0WM ++wxNZqW2wd2/NUlvF5UHkPlkEhJ6BqJ2fxzrDKQKgThCGJqkUWD+/SmUuvN7XxCJiIgG izmcnJbCJhyQ50ZXTqFbQ9JKcbciZMjKnCE= X-Virus-Scanned: ClamAV using ClamSMTP When compile-testing on other architectures, we get lots of warnings about incorrect format strings, like: drivers/dma/iop-adma.c: In function 'iop_adma_alloc_slots': drivers/dma/iop-adma.c:307:6: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=] drivers/dma/iop-adma.c: In function 'iop_adma_prep_dma_memcpy': >> drivers/dma/iop-adma.c:518:40: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'size_t {aka long unsigned int}' [-Wformat=] Use %zu for printing size_t as required, and cast the dma_addr_t arguments to 'u64' for printing with %llx. Ideally this should use the %pad format string, but that requires an lvalue argument that doesn't work here. Signed-off-by: Arnd Bergmann Acked-by: Vinod Koul --- drivers/dma/iop-adma.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 7857b54770d1..aebdd671651a 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -117,9 +117,9 @@ static void __iop_adma_slot_cleanup(struct iop_adma_chan *iop_chan) list_for_each_entry_safe(iter, _iter, &iop_chan->chain, chain_node) { pr_debug("\tcookie: %d slot: %d busy: %d " - "this_desc: %#x next_desc: %#x ack: %d\n", + "this_desc: %#x next_desc: %#llx ack: %d\n", iter->async_tx.cookie, iter->idx, busy, - iter->async_tx.phys, iop_desc_get_next_desc(iter), + iter->async_tx.phys, (u64)iop_desc_get_next_desc(iter), async_tx_test_ack(&iter->async_tx)); prefetch(_iter); prefetch(&_iter->async_tx); @@ -307,9 +307,9 @@ iop_adma_alloc_slots(struct iop_adma_chan *iop_chan, int num_slots, int i; dev_dbg(iop_chan->device->common.dev, "allocated slot: %d " - "(desc %p phys: %#x) slots_per_op %d\n", + "(desc %p phys: %#llx) slots_per_op %d\n", iter->idx, iter->hw_desc, - iter->async_tx.phys, slots_per_op); + (u64)iter->async_tx.phys, slots_per_op); /* pre-ack all but the last descriptor */ if (num_slots != slots_per_op) @@ -517,7 +517,7 @@ iop_adma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dma_dest, return NULL; BUG_ON(len > IOP_ADMA_MAX_BYTE_COUNT); - dev_dbg(iop_chan->device->common.dev, "%s len: %u\n", + dev_dbg(iop_chan->device->common.dev, "%s len: %zu\n", __func__, len); spin_lock_bh(&iop_chan->lock); @@ -550,7 +550,7 @@ iop_adma_prep_dma_xor(struct dma_chan *chan, dma_addr_t dma_dest, BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT); dev_dbg(iop_chan->device->common.dev, - "%s src_cnt: %d len: %u flags: %lx\n", + "%s src_cnt: %d len: %zu flags: %lx\n", __func__, src_cnt, len, flags); spin_lock_bh(&iop_chan->lock); @@ -583,7 +583,7 @@ iop_adma_prep_dma_xor_val(struct dma_chan *chan, dma_addr_t *dma_src, if (unlikely(!len)) return NULL; - dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n", + dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %zu\n", __func__, src_cnt, len); spin_lock_bh(&iop_chan->lock); @@ -621,7 +621,7 @@ iop_adma_prep_dma_pq(struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src, BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT); dev_dbg(iop_chan->device->common.dev, - "%s src_cnt: %d len: %u flags: %lx\n", + "%s src_cnt: %d len: %zu flags: %lx\n", __func__, src_cnt, len, flags); if (dmaf_p_disabled_continue(flags)) @@ -684,7 +684,7 @@ iop_adma_prep_dma_pq_val(struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src, return NULL; BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT); - dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n", + dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %zu\n", __func__, src_cnt, len); spin_lock_bh(&iop_chan->lock);